[llvm] [clang] [NVPTX] Add 'activemask' builtin and intrinsic support (PR #79768)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 29 11:36:20 PST 2024


================
@@ -4599,6 +4599,14 @@ def int_nvvm_vote_ballot_sync :
             [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.ballot.sync">,
   ClangBuiltin<"__nvvm_vote_ballot_sync">;
 
+//
+// ACTIVEMASK
+//
+def int_nvvm_activemask :
+  Intrinsic<[llvm_i32_ty], [],
+            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback, IntrHasSideEffects], "llvm.nvvm.activemask">,
+  ClangBuiltin<"__nvvm_activemask">;
----------------
Artem-B wrote:

Should we shange `__activemask` to use the new builtin instead of inline asm?
https://github.com/llvm/llvm-project/blob/eac8d713a6682417d06f5ee7f90a8ce54a281df8/clang/lib/Headers/__clang_cuda_intrinsics.h#L214

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


More information about the cfe-commits mailing list