[llvm] [Attributor] Propagate alignment through ptrmask (PR #150158)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 14 21:49:34 PDT 2025
================
@@ -5501,6 +5550,15 @@ struct AAAlignCallSiteReturned final
AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A)
: Base(IRP, A) {}
+ ChangeStatus updateImpl(Attributor &A) override {
+ Instruction *I = getIRPosition().getCtxI();
+ if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
+ Align Align = getAssumedAlignForIntrinsic(A, *this, *II);
+ return clampStateAndIndicateChange<StateType>(this->getState(),
+ Align.value());
+ }
+ return Base::updateImpl(A);
----------------
Shoreshen wrote:
Hi @shiltian , `Align()` is same as `Align(1)`, the `ShiftValue = 0` and the `value()` returns `uint64_t(1) << ShiftValue`
https://github.com/llvm/llvm-project/pull/150158
More information about the llvm-commits
mailing list