All instructions using the CPU flags types (IFLAGS/FFLAGS) were already removed. This patch completes the cleanup by removing all remaining instructions that define values of CPU flags types, as well as the types themselves. Specifically, the following features are removed: - The IFLAGS and FFLAGS types and the SpecialType category. - Special handling of IFLAGS and FFLAGS in machinst/isle.rs and machinst/lower.rs. - The ifcmp, ifcmp_imm, ffcmp, iadd_ifcin, iadd_ifcout, iadd_ifcarry, isub_ifbin, isub_ifbout, and isub_ifborrow instructions. - The writes_cpu_flags instruction property. - The flags verifier pass. - Flags handling in the interpreter. All of these features are currently unused; no functional change intended by this patch. This addresses https://github.com/bytecodealliance/wasmtime/issues/3249.
69 lines
1.0 KiB
Plaintext
69 lines
1.0 KiB
Plaintext
test licm
|
|
target riscv32
|
|
|
|
function %other_side_effects(i32) -> i32 {
|
|
|
|
block0(v0: i32):
|
|
jump block1(v0)
|
|
|
|
block1(v1: i32):
|
|
v2 = iconst.i32 1
|
|
brz v1, block3(v1)
|
|
jump block2
|
|
|
|
block2:
|
|
v5 = isub v1, v2
|
|
jump block1(v5)
|
|
|
|
block3(v6: i32):
|
|
return v6
|
|
|
|
}
|
|
|
|
function %spill(i32, i32) -> i32 {
|
|
block0(v0: i32, v1: i32):
|
|
v2 = spill.i32 v0
|
|
jump block1(v0, v1)
|
|
|
|
block1(v3: i32, v4: i32):
|
|
v5 = spill.i32 v1
|
|
v6 = fill.i32 v2
|
|
v7 = fill.i32 v5
|
|
; check: block1(v3: i32, v4: i32):
|
|
; check: v5 = spill.i32 v1
|
|
; check: v6 = fill.i32 v2
|
|
; check: v7 = fill v5
|
|
brz v1, block3(v1)
|
|
jump block2
|
|
|
|
block2:
|
|
v9 = isub v1, v4
|
|
jump block1(v9, v3)
|
|
|
|
block3(v10: i32):
|
|
return v10
|
|
}
|
|
|
|
function %non_invariant_aliases(i32) -> i32 {
|
|
|
|
block0(v0: i32):
|
|
jump block1(v0)
|
|
|
|
block1(v1: i32):
|
|
v8 -> v1
|
|
v9 -> v1
|
|
v2 = iadd v8, v9
|
|
; check: block1(v1: i32):
|
|
; check: v2 = iadd v8, v9
|
|
brz v1, block3(v1)
|
|
jump block2
|
|
|
|
block2:
|
|
v5 = isub v1, v2
|
|
jump block1(v5)
|
|
|
|
block3(v6: i32):
|
|
return v6
|
|
|
|
}
|