[clang] [llvm] [NVPTX] Emit bra.uni for proven uniform branches (PR #232269)

Mario Lezcano Casado via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 01:40:00 PDT 2026


================
@@ -2160,7 +2179,8 @@ def int_fake_use : DefaultAttrsIntrinsic<[], [llvm_vararg_ty],
 // Intrinsic to mask out bits of a pointer.
 // First argument must be pointer or vector of pointer. This is checked by the
 // verifier.
-def int_ptrmask: PureIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, llvm_anyint_ty]>;
+def int_ptrmask: PureIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, llvm_anyint_ty],
+    [IntrNoDivergenceSource]>;
----------------
lezcano wrote:

Yeah, putting this in `PureIntrisinc` makes sense.

As for `NVVMPureIntrinsic` it does not seem to inherit from `PureIntrinsic` so its name seems a bit misleading. Its functions can be not total (and not uniform, as `laneid` is part of these) so it's a bit weaker than `PureIntrinsic`.

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


More information about the cfe-commits mailing list