[llvm] [Loads] Check deref assumption early. (PR #127414)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 16 12:16:46 PST 2025
https://github.com/nikic commented:
I'm not sure this is the right direction. If I understand correctly, this still requires the pointers to be exactly the same, so e.g. if you have a deref(4) assumption at p+1, you won't be able to determine that deref(3) holds at p+2.
I think the solution to that would be to encode an offset into the deref operand bundle, similarly to how the align operand bundle takes an optional offset as well. Then canonicalize deref of gep to move the offset into the bundle and make use of it in isDerefAndAligned.
https://github.com/llvm/llvm-project/pull/127414
More information about the llvm-commits
mailing list