x86_32: legalize br{z,nz}.i64.

This commit is contained in:
whitequark
2020-05-29 17:17:56 +00:00
committed by Andrew Brown
parent 31b8e5695c
commit 3796164642
2 changed files with 74 additions and 34 deletions

View File

@@ -0,0 +1,36 @@
test compile
target i686
function u0:0(i32, i32) -> i32 {
block0(v0: i32, v1: i32):
v2 = iconcat v0, v1
; check: v6 = fill v0
; nextln: v3 = icmp_imm eq v6, 0
; nextln: v7 = fill v1
; nextln: v4 = icmp_imm eq v7, 0
; nextln: v5 = band v3, v4
; nextln: brnz v5, block1
brz v2, block1
jump block2
block1:
trap unreachable
block2:
trap unreachable
}
function u0:1(i32, i32) -> i32 {
block0(v0: i32, v1: i32):
v2 = iconcat v0, v1
; check: v3 = fill v0
; nextln: brnz v3, block1
; nextln: fallthrough block3
; check: block3:
; nextln: v4 = fill.i32 v1
; nextln: brnz v4, block1
brnz v2, block1
jump block2
block1:
trap unreachable
block2:
trap unreachable
}