Legalize some more i8/i16 intructions (#524)
* Legalize some more i8/i16 intructions
This commit is contained in:
24
cranelift/filetests/isa/x86/legalize-shlr-i8.clif
Normal file
24
cranelift/filetests/isa/x86/legalize-shlr-i8.clif
Normal file
@@ -0,0 +1,24 @@
|
||||
test compile
|
||||
target x86_64
|
||||
|
||||
; regex: V=v\d+
|
||||
|
||||
function u0:0(i8, i8) -> i8 fast {
|
||||
ebb0(v0: i8, v1: i8):
|
||||
v2 = ishl v0, v1
|
||||
; check: $(e1=$V) = uextend.i32 v0
|
||||
; check: $(r1=$V) = ishl $e1, v1
|
||||
; check v2 = ireduce.i8 $r1
|
||||
v3 = ushr v0, v1
|
||||
; check: $(e2=$V) = uextend.i32 v0
|
||||
; check: $(r2=$V) = ushr $e2, v1
|
||||
; check v2 = ireduce.i8 $r2
|
||||
v4 = sshr v0, v1
|
||||
; check: $(e3=$V) = sextend.i32 v0
|
||||
; check: $(r3=$V) = sshr $e3, v1
|
||||
; check v2 = ireduce.i8 $r3
|
||||
|
||||
v5 = iadd v2, v3
|
||||
v6 = iadd v4, v5
|
||||
return v6
|
||||
}
|
||||
Reference in New Issue
Block a user