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:
@@ -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")
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user