[llvm] [Attributor] Guard alignment query after pointer-vector stripping (PR #205389)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 00:51:45 PDT 2026


================
@@ -5282,7 +5282,8 @@ struct AAAlignImpl : AAAlign {
       takeKnownMaximum(Attr.getValueAsInt());
 
     Value &V = *getAssociatedValue().stripPointerCasts();
-    takeKnownMaximum(V.getPointerAlignment(A.getDataLayout()).value());
+    if (V.getType()->isPointerTy())
+      takeKnownMaximum(V.getPointerAlignment(A.getDataLayout()).value());
----------------
lijinpei-amd wrote:

code changed.

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


More information about the llvm-commits mailing list