+2018-11-14 Jeff Law <law@redhat.com>
+
+ * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
+ iff the operand is a constant.
+
2018-11-14 Aldy Hernandez <aldyh@redhat.com>
* gimple-ssa-evrp-analyze.c
start_sequence ();
/* Do the actual arithmetic. */
+ enum machine_mode op0_mode = CONSTANT_P (op0) ? int_mode : VOIDmode;
+ enum machine_mode op1_mode = CONSTANT_P (op1) ? int_mode : VOIDmode;
for (i = 0; i < GET_MODE_BITSIZE (int_mode) / BITS_PER_WORD; i++)
{
rtx target_piece = operand_subword (target, i, 1, int_mode);
rtx x = expand_binop (word_mode, binoptab,
- operand_subword_force (op0, i, int_mode),
- operand_subword_force (op1, i, int_mode),
+ operand_subword_force (op0, i, op0_mode),
+ operand_subword_force (op1, i, op1_mode),
target_piece, unsignedp, next_methods);
if (x == 0)