cranelift: Port most of simple_preopt.rs over to the peepmatic DSL
This ports all of the identity, no-op, simplification, and canonicalization related optimizations over from being hand-coded to the `peepmatic` DSL. This does not handle the branch-to-branch optimizations or most of the divide-by-constant optimizations.
This commit is contained in:
@@ -6,9 +6,9 @@ function u0:0(i8) -> i8 fast {
|
||||
block0(v0: i8):
|
||||
v1 = iconst.i8 0
|
||||
v2 = isub v1, v0
|
||||
; check: v3 = uextend.i32 v0
|
||||
; nextln: v5 = iconst.i32 0
|
||||
; nextln = isub v5, v3
|
||||
; nextln = ireduce.i8 v4
|
||||
; check: v4 = uextend.i32 v0
|
||||
; nextln: v6 = iconst.i32 0
|
||||
; nextln: v5 = isub v6, v4
|
||||
; nextln: v2 = ireduce.i8 v5
|
||||
return v2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user