As discussed in the 2022/10/19 meeting, this PR removes many of the branch and select instructions that used iflags, in favor if using brz/brnz and select in their place. Additionally, it reworks selectif_spectre_guard to take an i8 input instead of an iflags input. For reference, the removed instructions are: br_icmp, brif, brff, trueif, trueff, and selectif.
28 lines
515 B
Plaintext
28 lines
515 B
Plaintext
test simple-gvn
|
|
|
|
function %differing_typevars() -> i64 {
|
|
block0:
|
|
v0 = iconst.i32 7
|
|
v1 = iconst.i64 7
|
|
v2 = iconst.i64 8
|
|
; check: v0 = iconst.i32 7
|
|
; check: v1 = iconst.i64 7
|
|
; check: v2 = iconst.i64 8
|
|
v3 = uextend.i64 v0
|
|
v4 = iadd v2, v1
|
|
v5 = iadd v4, v3
|
|
return v5
|
|
}
|
|
|
|
function %cpu_flags() -> i8 {
|
|
block0:
|
|
v0 = iconst.i32 7
|
|
v1 = iconst.i32 8
|
|
v2 = icmp eq v0, v1
|
|
v3 = icmp eq v0, v1
|
|
v4 = bor v2, v3
|
|
; check: v2 = icmp eq v0, v1
|
|
; check: v4 = bor v2, v2
|
|
return v4
|
|
}
|