[llvm] [Attributor] Propagate alignment through ptrmask (PR #150158)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 14 21:11:27 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 , same as known I cannot tell from the return value that if it is correctly handled.
But what is different here is if it is intrinsic, the call will be equivalently handled as call to deceleration, which will create a pessimistic alignment attribute for the caller. so the following handle can be ignored and directly return here.
https://github.com/llvm/llvm-project/pull/150158
More information about the llvm-commits
mailing list