[llvm] [InstCombine] Fold align assume into load's !align metadata if possible. (PR #108958)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 05:16:57 PDT 2024


nikic wrote:

Based on https://github.com/dtcxzyw/llvm-opt-benchmark/pull/1320/files it looks like we end up losing the alignment information in ~most cases? Presumably because SROA later comes along and removes the load.

Note that for the existing non-null handling, SROA will actually rematerialize the nonnull assumption. But I'm reasonably confident that doing that for `!align` would have terrible effects, at least for frontends that use `!align` a lot.

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


More information about the llvm-commits mailing list