[llvm] [Attributor] Propagate alignment through ptrmask (PR #150158)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 18 19:57:48 PDT 2025
================
@@ -5188,6 +5188,81 @@ struct AADereferenceableCallSiteReturned final
// ------------------------ Align Argument Attribute ------------------------
namespace {
+
+Align getKnownAlignForIntrinsic(Attributor &A, AAAlign &QueryingAA,
+ const IntrinsicInst *II) {
+ switch (II->getIntrinsicID()) {
+ case Intrinsic::ptrmask: {
+ const auto *ConstVals = A.getAAFor<AAPotentialConstantValues>(
+ QueryingAA, IRPosition::value(*(II->getOperand(1))), DepClassTy::NONE);
----------------
shiltian wrote:
I think what @Shoreshen is doing here is to teach `AAAlign` to provide alignment information for this specific intrinsic.
However, I'm not sure what the `AlignAA` is doing here.
https://github.com/llvm/llvm-project/pull/150158
More information about the llvm-commits
mailing list