Skip to content

Commit 57ce053

Browse files
Flakebimemfrob
authored andcommitted
[AMDGPU] Add IntrWillReturn to three intrinsics
None of these can terminate a wave or lane. With these, all intrinsic are IntrWillReturn except those that change exec or can terminate the wave. Not marking intrinsics as WillReturn may prevent optimizations in the future: https://lists.llvm.org/pipermail/llvm-dev/2021-January/148047.html Differential Revision: https://reviews.llvm.org/D95436
1 parent 5fcd600 commit 57ce053

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/IR/IntrinsicsAMDGPU.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ class AMDGPUBufferAtomicFP : Intrinsic <
12041204
llvm_i32_ty, // vindex(VGPR)
12051205
llvm_i32_ty, // offset(SGPR/VGPR/imm)
12061206
llvm_i1_ty], // slc(imm)
1207-
[ImmArg<ArgIndex<4>>], "", [SDNPMemOperand]>,
1207+
[ImmArg<ArgIndex<4>>, IntrWillReturn], "", [SDNPMemOperand]>,
12081208
AMDGPURsrcIntrinsic<1, 0>;
12091209

12101210
// Legacy form of the intrinsic. raw and struct forms should be preferred.
@@ -1289,7 +1289,7 @@ def int_amdgcn_s_getreg :
12891289
def int_amdgcn_s_setreg :
12901290
GCCBuiltin<"__builtin_amdgcn_s_setreg">,
12911291
Intrinsic<[], [llvm_i32_ty, llvm_i32_ty],
1292-
[IntrNoMem, IntrHasSideEffects, ImmArg<ArgIndex<0>>]
1292+
[IntrNoMem, IntrHasSideEffects, IntrWillReturn, ImmArg<ArgIndex<0>>]
12931293
>;
12941294

12951295
// int_amdgcn_s_getpc is provided to allow a specific style of position
@@ -1725,7 +1725,7 @@ def int_amdgcn_image_bvh_intersect_ray :
17251725
Intrinsic<[llvm_v4i32_ty],
17261726
[llvm_anyint_ty, llvm_float_ty, llvm_v4f32_ty, llvm_anyvector_ty,
17271727
LLVMMatchType<1>, llvm_v4i32_ty],
1728-
[IntrReadMem]>;
1728+
[IntrReadMem, IntrWillReturn]>;
17291729

17301730
//===----------------------------------------------------------------------===//
17311731
// Deep learning intrinsics.

0 commit comments

Comments
 (0)