Delete old cranelift-preopt crate (#5642)
Most of these optimizations are in the egraph `cprop.isle` rules now, making a separate crate unnecessary. Also I think the `udiv` optimizations here are straight-up wrong (doing signed instead of unsigned division, and panicking instead of preserving traps on division by zero) so I'm guessing this crate isn't seriously used anywhere. At the least, bjorn3 confirms that cg_clif doesn't use this, and I've verified that Wasmtime doesn't either. Closes #1090.
This commit is contained in:
@@ -1,80 +0,0 @@
|
||||
test preopt
|
||||
target aarch64
|
||||
target x86_64
|
||||
|
||||
function %brz_fold() -> i32 {
|
||||
block0:
|
||||
v0 = iconst.i8 0
|
||||
brz v0, block2
|
||||
jump block1
|
||||
block1:
|
||||
v1 = iconst.i32 42
|
||||
return v1
|
||||
block2:
|
||||
v2 = iconst.i32 24
|
||||
return v2
|
||||
}
|
||||
; sameln: function %brz_fold
|
||||
; nextln: block0:
|
||||
; nextln: v0 = iconst.i8 0
|
||||
; nextln: jump block2
|
||||
; nextln:
|
||||
; nextln: block1:
|
||||
; nextln: v1 = iconst.i32 42
|
||||
; nextln: return v1
|
||||
; nextln:
|
||||
; nextln: block2:
|
||||
; nextln: v2 = iconst.i32 24
|
||||
; nextln: return v2
|
||||
; nextln: }
|
||||
|
||||
function %brnz_fold() -> i32 {
|
||||
block0:
|
||||
v0 = iconst.i8 1
|
||||
brnz v0, block2
|
||||
jump block1
|
||||
block1:
|
||||
v1 = iconst.i32 42
|
||||
return v1
|
||||
block2:
|
||||
v2 = iconst.i32 24
|
||||
return v2
|
||||
}
|
||||
; sameln: function %brnz_fold
|
||||
; nextln: block0:
|
||||
; nextln: v0 = iconst.i8 1
|
||||
; nextln: jump block2
|
||||
; nextln:
|
||||
; nextln: block1:
|
||||
; nextln: v1 = iconst.i32 42
|
||||
; nextln: return v1
|
||||
; nextln:
|
||||
; nextln: block2:
|
||||
; nextln: v2 = iconst.i32 24
|
||||
; nextln: return v2
|
||||
; nextln: }
|
||||
|
||||
function %brz_fold_param(i8) -> i32 {
|
||||
block0(v0: i8):
|
||||
brz v0, block2
|
||||
jump block1
|
||||
block1:
|
||||
v1 = iconst.i32 42
|
||||
return v1
|
||||
block2:
|
||||
v2 = iconst.i32 24
|
||||
return v2
|
||||
}
|
||||
; sameln: function %brz_fold_param(i8) -> i32 fast {
|
||||
; nextln: block0(v0: i8):
|
||||
; nextln: brz v0, block2
|
||||
; nextln: jump block1
|
||||
; nextln:
|
||||
; nextln: block1:
|
||||
; nextln: v1 = iconst.i32 42
|
||||
; nextln: return v1
|
||||
; nextln:
|
||||
; nextln: block2:
|
||||
; nextln: v2 = iconst.i32 24
|
||||
; nextln: return v2
|
||||
; nextln: }
|
||||
@@ -1,20 +0,0 @@
|
||||
test preopt
|
||||
target aarch64
|
||||
target x86_64
|
||||
|
||||
function %constant_fold(f64) -> f64 {
|
||||
block0(v0: f64):
|
||||
v1 = f64const 0x1.0000000000000p0
|
||||
v2 = f64const 0x1.0000000000000p1
|
||||
v3 = fadd v1, v2
|
||||
v4 = fadd v3, v0
|
||||
return v4
|
||||
}
|
||||
; sameln: function %constant_fold(f64) -> f64 fast {
|
||||
; nextln: block0(v0: f64):
|
||||
; nextln: v1 = f64const 0x1.0000000000000p0
|
||||
; nextln: v2 = f64const 0x1.0000000000000p1
|
||||
; nextln: v3 = f64const 0x1.8000000000000p1
|
||||
; nextln: v4 = fadd v3, v0
|
||||
; nextln: return v4
|
||||
; nextln: }
|
||||
@@ -1,37 +0,0 @@
|
||||
test preopt
|
||||
target aarch64
|
||||
target x86_64
|
||||
|
||||
function %iadd_fold() -> i32 {
|
||||
block0:
|
||||
v0 = iconst.i32 37
|
||||
v1 = iconst.i32 5
|
||||
v2 = iadd v0, v1
|
||||
v3 = iconst.i32 8
|
||||
v4 = iadd v2, v3
|
||||
return v4
|
||||
}
|
||||
; sameln: function %iadd_fold
|
||||
; nextln: block0:
|
||||
; nextln: v0 = iconst.i32 37
|
||||
; nextln: v1 = iconst.i32 5
|
||||
; nextln: v2 = iconst.i32 42
|
||||
; nextln: v3 = iconst.i32 8
|
||||
; nextln: v4 = iconst.i32 50
|
||||
; nextln: return v4
|
||||
; nextln: }
|
||||
|
||||
function %isub_fold() -> i32 {
|
||||
block0:
|
||||
v0 = iconst.i32 42
|
||||
v1 = iconst.i32 1
|
||||
v2 = isub v0, v1
|
||||
return v2
|
||||
}
|
||||
; sameln: function %isub_fold
|
||||
; nextln: block0:
|
||||
; nextln: v0 = iconst.i32 42
|
||||
; nextln: v1 = iconst.i32 1
|
||||
; nextln: v2 = iconst.i32 41
|
||||
; nextln: return v2
|
||||
; nextln: }
|
||||
Reference in New Issue
Block a user