[Mlir-commits] [mlir] [mlir][rocdl] Add `readfirstlane` intrinsic (PR #152551)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Aug 7 10:21:21 PDT 2025
================
@@ -189,7 +189,21 @@ def ROCDL_BallotOp :
let assemblyFormat = "$pred attr-dict `:` type($res)";
}
-def ROCDL_ReadlaneOp : ROCDL_IntrOp<"readlane", [], [0], [AllTypesMatch<["res", "src0"]>], 1>,
+def ROCDL_ReadfirstlaneOp : ROCDL_IntrOp<"readfirstlane", [], [0], [AllTypesMatch<["res", "src"]>, Pure], 1>,
----------------
kuhar wrote:
IIUC, this relies on the execution mask to determine the first active lane. Do we really want this to be pure and enable speculation/hoisting, since hoisting outside of ifs/loops can affect active lanes?
https://github.com/llvm/llvm-project/pull/152551
More information about the Mlir-commits
mailing list