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
Why did this code move?