ght be confusing here.
>> Would an additional parameter like "bool set_op2_mode" make it clearer?
>> Another option is to separate this into another function altogether like
>> emit_len_binop_scalar or so.
No, you just use op2mode which you pass throu
> + machine_mode op2mode = Pmode;
> + if (inner == E_QImode || inner == E_HImode || inner == E_SImode)
> + op2mode = inner;
This I added in order to match the scalar variants like
[(set (match_operand:VI_QHS 0 "register_operand" "=vd,vd, vr, vr")
(if_then_else:VI_QHS
Thanks Robin.
A couple comments here:
+ machine_mode op2mode = Pmode;
+ if (inner == E_QImode || inner == E_HImode || inner == E_SImode)
+ op2mode = inner;
Remove it.
+
change it into
+ e.add_input_operand (src2, op2mode == VOIDmode ? GET_MODE (src2) : op2mode);
Very confusing