[llvm] [InferAlignment] Do not use intrinsic align attributes as base pointer alignment (PR #221018)
Stanislav Bardyuk via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 05:01:30 PDT 2026
================
@@ -80,8 +80,10 @@ static bool tryToImproveAlign(
if (!Arg->getType()->isPointerTy())
continue;
+ // The align attribute is not proof of an access (e.g. a zero-length
+ // memset), so it must not seed the base pointer alignment.
Align OldAlign = II->getParamAlign(ArgNo).valueOrOne();
- Align NewAlign = Fn(Arg, OldAlign, Align(1));
+ Align NewAlign = Fn(Arg, Align(1), Align(1));
----------------
kodlan wrote:
done
https://github.com/llvm/llvm-project/pull/221018
More information about the llvm-commits
mailing list