[llvm] Add IntrWillReturn to intrinsics (PR #101562)

Kevin McAfee via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 07:59:49 PDT 2024


================
@@ -4699,7 +4699,7 @@ def int_nvvm_redux_sync_or : ClangBuiltin<"__nvvm_redux_sync_or">,
 class NVVM_WMMA_LD<WMMA_REGS Frag, string Layout, int WithStride>
   : Intrinsic<Frag.regs,
               !if(WithStride, [llvm_anyptr_ty, llvm_i32_ty], [llvm_anyptr_ty]),
-              [IntrReadMem, IntrArgMemOnly, IntrNoCallback, ReadOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>],
+              [IntrWillReturn, IntrReadMem, IntrArgMemOnly, IntrNoCallback, ReadOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>],
----------------
kalxr wrote:

For some extra context, this batch of changes was motivated by https://github.com/llvm/llvm-project/pull/99999 which slightly changes some behavior related to intrinsics that are treated as loads in the SDAG. Of the NVVM intrinsics affected by that, this was the only one that seemed to be missing `WillReturn`. Earlier, https://github.com/llvm/llvm-project/pull/98968 updated some other similar cases. There are likely more intrinsics that should have `WillReturn` or inherit the default attributes that are not addressed in this patch due to being unaffected by the SDAG change.

https://github.com/llvm/llvm-project/pull/101562


More information about the llvm-commits mailing list