[llvm] [llvm] Optimize misaligned accesses with early profitable splitting (PR #145168)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 22 03:18:35 PDT 2025
nikic wrote:
> > > This is a good idea, but I still have the following questions: 1. MMO BaseAlign corresponds to IR Value, and MPI Offset is a constant. In order to obtain the optimal align info, we may need a new base + offset and introduce a new IR Value, which seems inappropriate.
> >
> >
> > It's not necessary to introduce a new IR value, it already exists: It's the pointer operand of a constant offset GEP.
>
> I mean, maybe in some cases it is not possible to directly get the appropriate base value, they may not be optimally aligned, or the offset may be negative.
If you don't have an appropriately aligned base your current approach will also not help, right? And the offset stored in MPI is allowed to be negative.
https://github.com/llvm/llvm-project/pull/145168
More information about the llvm-commits
mailing list