Merge commit '598f090956
' into sync_cg_clif-2023-01-24
This commit is contained in:
commit
b829bb7431
45 changed files with 1139 additions and 1108 deletions
|
@ -7,7 +7,7 @@ use cranelift_frontend::FunctionBuilder;
|
|||
/// otherwise return the given value and false.
|
||||
pub(crate) fn maybe_unwrap_bool_not(bcx: &mut FunctionBuilder<'_>, arg: Value) -> (Value, bool) {
|
||||
if let ValueDef::Result(arg_inst, 0) = bcx.func.dfg.value_def(arg) {
|
||||
match bcx.func.dfg[arg_inst] {
|
||||
match bcx.func.dfg.insts[arg_inst] {
|
||||
// This is the lowering of `Rvalue::Not`
|
||||
InstructionData::IntCompareImm {
|
||||
opcode: Opcode::IcmpImm,
|
||||
|
@ -34,7 +34,7 @@ pub(crate) fn maybe_known_branch_taken(
|
|||
return None;
|
||||
};
|
||||
|
||||
match bcx.func.dfg[arg_inst] {
|
||||
match bcx.func.dfg.insts[arg_inst] {
|
||||
InstructionData::UnaryImm { opcode: Opcode::Iconst, imm } => {
|
||||
if test_zero {
|
||||
Some(imm.bits() == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue