cranelift: Remove brz and brnz (#5630)

Remove the brz and brnz instructions, as their behavior is now redundant with brif.
This commit is contained in:
Trevor Elliott
2023-01-30 12:34:56 -08:00
committed by GitHub
parent 77cf547f41
commit a5698cedf8
247 changed files with 2947 additions and 3754 deletions

View File

@@ -8,9 +8,8 @@ pub(crate) struct Formats {
pub(crate) binary: Rc<InstructionFormat>,
pub(crate) binary_imm8: Rc<InstructionFormat>,
pub(crate) binary_imm64: Rc<InstructionFormat>,
pub(crate) brif: Rc<InstructionFormat>,
pub(crate) branch: Rc<InstructionFormat>,
pub(crate) branch_table: Rc<InstructionFormat>,
pub(crate) brif: Rc<InstructionFormat>,
pub(crate) call: Rc<InstructionFormat>,
pub(crate) call_indirect: Rc<InstructionFormat>,
pub(crate) cond_trap: Rc<InstructionFormat>,
@@ -114,8 +113,6 @@ impl Formats {
jump: Builder::new("Jump").block().build(),
branch: Builder::new("Branch").value().block().build(),
brif: Builder::new("Brif").value().block().block().build(),
branch_table: Builder::new("BranchTable")

View File

@@ -65,38 +65,6 @@ fn define_control_flow(
);
}
{
let c = &Operand::new("c", ScalarTruthy).with_doc("Controlling value to test");
ig.push(
Inst::new(
"brz",
r#"
Branch when zero.
Take the branch when ``c = 0``.
"#,
&formats.branch,
)
.operands_in(vec![c, block_call])
.is_branch(true),
);
ig.push(
Inst::new(
"brnz",
r#"
Branch when non-zero.
Take the branch when ``c != 0``.
"#,
&formats.branch,
)
.operands_in(vec![c, block_call])
.is_branch(true),
);
}
{
let _i32 = &TypeVar::new(
"i32",