[llvm] [LV] Change VPVectorPointerRecipe to emit byte GEP instead of typed GEP (PR #174934)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 12 01:25:47 PST 2026


Mel-Chen wrote:

> Another direction would be to rename offset (I don’t have a good name yet, so let’s call it VFxPart for now). Initially, we would only create
> 
> ```
> vector-pointer %base_ptr, %stride
> ```
> 
> and during unrolling change it to
> 
> ```
> vector-pointer %base_ptr, %stride, %VFxPart
> ```
> 
> Then, in `VPVectorPointerRecipe::execute`, we would compute `gep <EltType> %base_ptr, %VFxPart * %stride`.

I’ve temporarily gone with this approach in #147297. In 61f0b2a6989ffb0a40c4b9dfc64f3ca5a71c5e01, you can see that whether the stride multiplication is explicitly pulled out during unrolling does have some impact, but not much. 

> Which approach to take depends on whether we want all Mul operations of VPVectorPointerRecipe to be explicitly represented as recipes in VPlan.

So I think this topic can be deferred for now.



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


More information about the llvm-commits mailing list