Skip to content

Commit 09febc7

Browse files
committed
Fixed deprecated call and test
1 parent 551589a commit 09febc7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19449,7 +19449,8 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
1944919449
case Builtin::BI__builtin_hlsl_group_memory_barrier_with_group_sync: {
1945019450
Intrinsic::ID ID =
1945119451
CGM.getHLSLRuntime().getGroupMemoryBarrierWithGroupSyncIntrinsic();
19452-
return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID));
19452+
return EmitRuntimeCall(
19453+
Intrinsic::getOrInsertDeclaration(&CGM.getModule(), ID));
1945319454
}
1945419455
}
1945519456
return nullptr;

clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
// CHECK-DXIL: define void @
1111
// CHECK-SPIRV: define spir_func void @
1212
void test_GroupMemoryBarrierWithGroupSync() {
13-
// CHECK: call void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
13+
// CHECK-DXIL: call void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
14+
// CHECK-SPIRV: call spir_func void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
1415
GroupMemoryBarrierWithGroupSync();
1516
}
1617

0 commit comments

Comments
 (0)