[llvm] [Attributor] Propagate alignment through ptrmask (PR #150158)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 24 21:46:54 PDT 2025


================
@@ -5202,6 +5252,8 @@ static unsigned getKnownAlignForUse(Attributor &A, AAAlign &QueryingAA,
       TrackUse = true;
     return 0;
   }
+  if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
+    return getKnownAlignForIntrinsic(A, QueryingAA, *II).value();
----------------
Shoreshen wrote:

Hi @shiltian , as Matthew mentioned in https://github.com/llvm/llvm-project/pull/150158#discussion_r2247435706, it cannot be tell if the intrinsic is handled since the intrinsic it self may also return alignment of 1.

What I can do is continuing the code if the returned align is 1..... but it could be a valid return....

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


More information about the llvm-commits mailing list