[llvm] [GISEL] G_SPLAT_VECTOR can take a splat that is larger than the vector element (PR #86974)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 11:42:51 PDT 2024


michaelmaitland wrote:

> I am again confused. You want to take i64 splats on 32-bit machines and truncate the i64 to i32? You can just state that i64 are not legal?!?

>From selection dag:
> The type of the operand must match the vector element type, except when they are integer types. In this case the operand is allowed to be wider than the vector element type, and is implicitly truncated to it.

I want to do this since the patterns have an sXLen operand which can be s32 on RV32 and I should be able to create a 8b, 16b splat vector. 


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


More information about the llvm-commits mailing list