[Mlir-commits] [clang] [llvm] [mlir] [IR] Replace alignment argument with attribute on masked intrinsics (PR #163802)
Nikita Popov
llvmlistbot at llvm.org
Fri Oct 17 08:38:45 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;
----------------
nikic wrote:
In the default pipeline, InferAlignment is that common pass. Though it would probably make sense to extend this code to handle all memory intrinsics instead of only masked.load/store now.
In the non-default pipeline, I expect that this will enable alignment inference in Attributor.
https://github.com/llvm/llvm-project/pull/163802
More information about the Mlir-commits
mailing list