[llvm] [LegalizeTypes] Handle non byte-sized elt types when splitting INSERT/EXTRACT_VECTOR_ELT (PR #93357)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 03:51:46 PDT 2024


arsenm wrote:

> > Is the nearest byte really what we want here? We can widen to any type we want, and on most targets, storing an `<N x i32>` is going to be a lot more efficient than storing an `<N x i24>`.
> 
> It is a bit hard to understand what is best for every target (unless perhaps scanning for some legal type, if such a type exists). Some reasons for not picking a larger element type would be:

Using the next legal element type would be a reasonable default. Maybe you want next legal store memory type 

> 
> * Our downstream target can store things like i24, so using getRoundIntegerType would both introduce an unneeded extend, but also wasting stack space. 

As in i24 is a legal type, or truncating store i32->i24 is legal? 





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


More information about the llvm-commits mailing list