add bnot to peepmatic + transform rule
This commit is contained in:
@@ -237,6 +237,7 @@ impl Opcode {
|
||||
BandImm,
|
||||
Bconst,
|
||||
Bint,
|
||||
Bnot,
|
||||
Bor,
|
||||
BorImm,
|
||||
Brnz,
|
||||
@@ -549,6 +550,11 @@ unsafe impl<'a, 'b> InstructionSet<'b> for &'a dyn TargetIsa {
|
||||
let val = pos.ins().bint(ty, a);
|
||||
pos.func.dfg.value_def(val).unwrap_inst().into()
|
||||
}
|
||||
Operator::Bnot => {
|
||||
let a = part_to_value(pos, root, a).unwrap();
|
||||
let val = pos.ins().bnot(a);
|
||||
pos.func.dfg.value_def(val).unwrap_inst().into()
|
||||
}
|
||||
Operator::Brnz => {
|
||||
let a = part_to_value(pos, root, a).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user