This patch adds improvements for sext/zext in Global ISel.
For example, this piece of code:
define i64 @si64(<4 x i32> %0, i32 %1) { %3 = extractelement <4 x i32> %0, i64 1 %s = sext i32 %3 to i64 ret i64 %s }
Used to have this lowering:
si64: mov s0, v0.s[1] fmov w8, s0 sxtw x0, w8 ret
Whereas this patch makes it lower to this:
si64: smov x0, v0.h[0] ret
The boolean parameter on the end is true if this is commutative. I don't think G_EXTRACT_VECTOR_ELT is? Should this be false?