[llvm] [InstCombine] Ignore offset when removing redundant alignment assumptions (PR #202423)
Nikolas Klauser via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 13:09:24 PDT 2026
philnik777 wrote:
> > We don't currently use that information anywhere, so we
> > should just drop the assume in this case.
>
> I believe the AlignmentFromAssumptions pass uses this knowledge. Though we probably don't generate align assumes with offset anywhere?
>
> I think we should either be retaining the offset information or dropping support for offsets entirely. But dropping the assume if we only know the alignment of the base pointer imho defeats the point of the offset argument.
I think you're misunderstanding my claim. The only additional information we gain is about the offset value, not the pointer. We're _not_ dropping all bundles with a non-zero offset with this patch. We're only dropping assumptions where we know that the offset must be a multiple of the alignment. I don't know whether that's used in `AlignmentFromAssumptions`, but I would be at least mildly surprised.
https://github.com/llvm/llvm-project/pull/202423
More information about the llvm-commits
mailing list