[llvm] [NVVM] Update properties for non-sync variants of the SHFL intrinsics (PR #189615)
Prerona Chaudhuri via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 02:48:32 PDT 2026
================
@@ -2477,13 +2477,22 @@ def int_nvvm_read_ptx_sreg_dynamic_smem_size :
//
// SHUFFLE
//
-// Generate intrinsics for all variants of shfl instruction.
-let IntrProperties = [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback] in {
- foreach sync = [false, true] in {
+// Non-sync SHFL variants are pure functions of their SSA operands and the active
+// thread mask. Memory properties (IntrReadMem + IntrInaccessibleMemOnly + IntrWillReturn)
+// model reading the implicit mask state to ensure correct ordering with other convergent
+// operations, preventing unsafe reordering while allowing DCE of truly dead code.
+//
+// Sync shfl variants have synchronization side effects modeled as
+// inaccessible memory accesses to prevent DCE and reordering.
+foreach isSync = [false, true] in {
----------------
pchaudhuri-nv wrote:
Thanks for the feedback.
I have incorporated the changes.
I don't have merge access. Can you kindly help with merging this MR ?
Thank you so much
https://github.com/llvm/llvm-project/pull/189615
More information about the llvm-commits
mailing list