Fix brz.i128

Fixes #1066
This commit is contained in:
bjorn3
2019-10-01 21:32:37 +02:00
committed by Benjamin Bouvier
parent 0d50462a93
commit 093b3b3426
2 changed files with 13 additions and 1 deletions

View File

@@ -257,7 +257,7 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
)
),
def!(c = band(a, b)),
def!(brz(c, ebb, vararg)),
def!(brnz(c, ebb, vararg)),
],
);

View File

@@ -4,6 +4,11 @@ target x86_64
function u0:0(i128) -> i8 fast {
ebb0(v0: i128):
brz v0, ebb2
; check: v0 = iconcat v3, v4
; nextln: v5 = icmp_imm eq v3, 0
; nextln: v6 = icmp_imm eq v4, 0
; nextln: v7 = band v5, v6
; nextln: brnz v7, ebb2
jump ebb1
ebb1:
@@ -18,7 +23,14 @@ ebb2:
function u0:1(i128) -> i8 fast {
ebb0(v0: i128):
brnz v0, ebb2
; check: v0 = iconcat v3, v4
; nextln: brnz v3, ebb2
; nextln: fallthrough ebb3
; check: ebb3:
; nextln: brnz.i64 v4, ebb2
jump ebb1
; nextln: fallthrough ebb1
ebb1:
v1 = iconst.i8 0