[llvm] [BasicAA] Add Vscale GEP decomposition on variable index (PR #69152)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 02:29:34 PST 2024


davemgreen wrote:

> If I'm reading this right, the main goal of this is to be able to represent a gep whose index type is a scalable type? If so, I'm tempted to suggest an alternative approach.
> 
> We seem to generally be moving in the direction of the ptradd (i.e. i8 index types), could we canonicalize a gep <vscale x ...> to a gep i8, ? Doing so would remove the need for a value to represent vscale when we can't just use the intrinsic. This would remove the need for the sentinel value, and would simplify this patch significantly (I think).

Thanks for the suggestion - that would certainly help simplify things. I was originally a little sceptical that it would not lead to regressions (especially in LSR), but I've been running a few experiments and I think things look like they should be OK. I will see if I can make just i8 + vscale intrinsics work and maybe try and split it up into separate parts where I can.

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


More information about the llvm-commits mailing list