[llvm] [VectorCombine] Prevent extract/ins rewrite to GEP (PR #150216)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 03:06:15 PDT 2025


RKSimon wrote:

> > Is there no TTI hook we can use?
> 
> @RKSimon Would it be OK to move forward with a target-specific switch? I could also add a new bit like "disableVectorElementAccessUsingGEP" which would allow to prevent this on a target-by-target basis until the pattern is officially disallowed? (if it is one day)

Sure a TTI::disableVectorElementAccessUsingGEP() with SPIRV override seems cleaner to me.

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


More information about the llvm-commits mailing list