Add commutative addition cases
This commit is contained in:
@@ -10,8 +10,19 @@ block0(v0: i8):
|
||||
return v3
|
||||
}
|
||||
|
||||
; check: movz x1, #42
|
||||
; nextln: add x0, x1, x0, SXTB
|
||||
; check: sxtb x0, w0
|
||||
; nextln: add x0, x0, #42
|
||||
; nextln: ret
|
||||
|
||||
|
||||
function %f2(i8, i64) -> i64 {
|
||||
block0(v0: i8, v1: i64):
|
||||
v2 = sextend.i64 v0
|
||||
v3 = iadd.i64 v2, v1
|
||||
return v3
|
||||
}
|
||||
|
||||
; check: add x0, x1, x0, SXTB
|
||||
; nextln: ret
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user