cranelift: simplify x-x to 0 (#6032)
* cranelift: simplify `x-x` to `0` * Guard `x-x => 0` rewrite with `fits_in_64`
This commit is contained in:
@@ -232,6 +232,14 @@ block0(v0: i32):
|
||||
; check: return v0
|
||||
}
|
||||
|
||||
function %isub_self(i32) -> i32 {
|
||||
block0(v0: i32):
|
||||
v1 = isub v0, v0
|
||||
return v1
|
||||
; check: v2 = iconst.i32 0
|
||||
; check: return v2
|
||||
}
|
||||
|
||||
function %or_and_y_with_not_y_i8(i8, i8) -> i8 {
|
||||
block0(v0: i8, v1: i8):
|
||||
v2 = band v0, v1
|
||||
|
||||
Reference in New Issue
Block a user