>The attached patch prevents the creation of reg-moves for definitions >with MODE_CC and thus solves this ICE. > >Currently testing and bootstrap on ppc64-redhat-linux, enabling SMS on >loops with SC 1. > >OK for 4.7 once testing completes?
Yes, thanks for catching this. Shouldn't we prevent creating such regmoves for (the other case of) intra-loop anti-deps as well? >> While true, I doubt either PPC or MIPS really benefit from moving >> around registers of CCmode. IIRC, PPC has eight 4-bit CR's and supports efficient copying of *one bit* from one CR to another (via cror), which would require special regmove handling. Hence I share your doubt. Ayal. On Thu, Dec 22, 2011 at 10:53 AM, Richard Sandiford <richard.sandif...@linaro.org> wrote: > Richard Henderson <r...@redhat.com> writes: >> On 12/20/2011 09:47 AM, Richard Sandiford wrote: >>> Revital Eres <revital.e...@linaro.org> writes: >>>> +/* Return true if one of the definitions in INSN has MODE_CC. Otherwise >>>> + return false. */ >>>> +static bool >>>> +def_has_ccmode_p (rtx insn) >>>> +{ >>>> + df_ref *def; >>>> + >>>> + for (def = DF_INSN_DEFS (insn); *def; def++) >>>> + { >>>> + enum machine_mode mode = GET_MODE (DF_REF_REG (*def)); >>>> + >>>> + if (GET_MODE_CLASS (mode) == MODE_CC) >>>> + return true; >>>> + } >>>> + >>>> + return false; >>>> +} >>> >>> FWIW, an alternative might be to test have_regs_of_mode[(int) mode]. >>> That says whether there are any allocatable (non-fixed) registers >>> of the given mode. >> >> While true, I doubt either PPC or MIPS really benefit from moving >> around registers of CCmode. Certainly MIPS has no way of easily >> moving CCmode registers around. It's a rather complicated reload, >> that. >> >> I'd be very tempted to simply go with the original patch. > > OK, sorry for the noise. > > Richard