[clang] [llvm] [mlir] [IR] Replace alignment argument with attribute on masked intrinsics (PR #163802)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 17 07:11:36 PDT 2025


================
@@ -45,25 +45,20 @@ static bool tryToImproveAlign(
   switch (II->getIntrinsicID()) {
   case Intrinsic::masked_load:
   case Intrinsic::masked_store: {
-    int AlignOpIdx = II->getIntrinsicID() == Intrinsic::masked_load ? 1 : 2;
-    Value *PtrOp = II->getIntrinsicID() == Intrinsic::masked_load
-                       ? II->getArgOperand(0)
-                       : II->getArgOperand(1);
+    unsigned PtrOpIdx = II->getIntrinsicID() == Intrinsic::masked_load ? 0 : 1;
----------------
jhuber6 wrote:

Do we still need this handling if it's a property of the parameter? Figured there would be a common pass for increasing alignment on parameters.

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


More information about the cfe-commits mailing list