/// Checks for an instance of `op` feeding the given input.
Checks for an instance of `op` feeding the given input.
Checks for an instance of ` op ` feeding the given input .
pub(crate) fn maybe_input_insn<C: LowerCtx<I = Inst>>(
    c: &mut C,
    input: InsnInput,
    op: Opcode,
) -> Option<IRInst> {
    let inputs = c.get_input(input.insn, input.input);
    debug!(
        "maybe_input_insn: input {:?} has options {:?}; looking for op {:?}",
        input, inputs, op
    );
    if let Some((src_inst, _)) = inputs.inst {
        let data = c.data(src_inst);
        debug!(" -> input inst {:?}", data);
        if data.opcode() == op {
            return Some(src_inst);
        }
    }
    None
}
pub ( crate ) fn maybe_input_insn < C : LowerCtx < I = Inst > > ( c : & mut C , input : InsnInput , op : Opcode , ) -> Option < IRInst > { let inputs = c . get_input ( input . insn , input . input ) ; debug ! ( " " input inputs op ) ; if let Some ( ( src_inst , _ ) ) = inputs . inst { let data = c . data ( src_inst ) ; debug ! ( " " data ) ; if data . opcode ( ) == op { return Some ( src_inst ) ; } } None }
Checks for an instance of `op` feeding the given input.
Checks for an instance of ` op ` feeding the given input .
c
&mut C
input
InsnInput
op
Opcode