Rather than outright replacing parts of our existing peephole optimizations passes, this makes peepmatic an optional cargo feature that can be enabled. This allows us to take a conservative approach with enabling peepmatic everywhere, while also allowing us to get it in-tree and make it easier to collaborate on improving it quickly.
15 lines
257 B
Plaintext
15 lines
257 B
Plaintext
test compile
|
|
set opt_level=speed_and_size
|
|
target x86_64
|
|
|
|
function u0:0(i8) -> i8 fast {
|
|
block0(v0: i8):
|
|
v1 = iconst.i8 0
|
|
v2 = isub v1, v0
|
|
; check: uextend.i32
|
|
; nextln: iconst.i32
|
|
; nextln: isub
|
|
; nextln: ireduce.i8
|
|
return v2
|
|
}
|