Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> writes: > Hi Richard, > > Thanks for the review. Attached is the latest patch. > > For testcase like cond_arith_1.c, with the patch, gcc ICE in fwprop. I > am limiting fwprop in cases like this. Is there a better fix for this? > index cf2c9de..2c99285 100644 > --- a/gcc/fwprop.c > +++ b/gcc/fwprop.c > @@ -1358,6 +1358,15 @@ forward_propagate_and_simplify (df_ref use, > rtx_insn *def_insn, rtx def_set) > else > mode = GET_MODE (*loc); > > + /* TODO. We can't get the mode for > + (set (reg:VNx16BI 109) > + (unspec:VNx16BI [ > + (reg:SI 131) > + (reg:SI 106) > + ] UNSPEC_WHILE_LO)) > + Thus, bailout when it is UNSPEC and MODEs are not compatible. */ > + if (GET_MODE_CLASS (mode) != GET_MODE_CLASS (GET_MODE (reg))) > + return false; > new_rtx = propagate_rtx (*loc, mode, reg, src, > optimize_bb_for_speed_p (BLOCK_FOR_INSN (use_insn)));
What specifically goes wrong? The unspec above isn't that unusual -- many unspecs have different modes from their inputs. Thanks, Richard