Message ID | 2e84b9a3d2a12f46116328b6b449c4f361c9f3c9.1474935886.git.segher@kernel.crashing.org |
---|---|
State | New |
Headers | show |
On Tue, Sep 27, 2016 at 12:33:59AM +0000, Segher Boessenkool wrote: > * config/rs6000/rs6000.md (movcc_internal1): Disparage using CTR or LR. Actually, not disparage, but ignore when choosing register preferences. > (define_insn "*movcc_internal1" > - [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,y,r,r,r,r,r,cl,r,m") > - (match_operand:CC 1 "general_operand" "y,r,r,O,x,y,r,I,h,r,m,r"))] > + [(set (match_operand:CC 0 "nonimmediate_operand" > + "=y,x,?y,y,r,r,r,r,r,*c*l,r,m") > + (match_operand:CC 1 "general_operand" > + " y,r, r,O,x,y,r,I,h, r,m,r"))] What about that "h" lurking there?
On Tue, Sep 27, 2016 at 02:29:46PM +0930, Alan Modra wrote: > On Tue, Sep 27, 2016 at 12:33:59AM +0000, Segher Boessenkool wrote: > > * config/rs6000/rs6000.md (movcc_internal1): Disparage using CTR or LR. > > Actually, not disparage, but ignore when choosing register > preferences. @cindex @samp{*} in constraint @item * Says that the following character should be ignored when choosing register preferences. @samp{*} has no effect on the meaning of the constraint as a constraint, and no effect on reloading. For LRA @samp{*} additionally disparages slightly the alternative if the following character matches the operand. I should just have said "add *", much clearer :-) > > (define_insn "*movcc_internal1" > > - [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,y,r,r,r,r,r,cl,r,m") > > - (match_operand:CC 1 "general_operand" "y,r,r,O,x,y,r,I,h,r,m,r"))] > > + [(set (match_operand:CC 0 "nonimmediate_operand" > > + "=y,x,?y,y,r,r,r,r,r,*c*l,r,m") > > + (match_operand:CC 1 "general_operand" > > + " y,r, r,O,x,y,r,I,h, r,m,r"))] > > What about that "h" lurking there? I haven't seen it do the wrong thing (yet). There are various other mov patterns that allow "h" as source like this, btw; if you want to change it here, please see if you can change all? Segher
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 7b995ac..a9fabc1 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -6653,8 +6653,10 @@ (define_expand "movcc" "") (define_insn "*movcc_internal1" - [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,y,r,r,r,r,r,cl,r,m") - (match_operand:CC 1 "general_operand" "y,r,r,O,x,y,r,I,h,r,m,r"))] + [(set (match_operand:CC 0 "nonimmediate_operand" + "=y,x,?y,y,r,r,r,r,r,*c*l,r,m") + (match_operand:CC 1 "general_operand" + " y,r, r,O,x,y,r,I,h, r,m,r"))] "register_operand (operands[0], CCmode) || register_operand (operands[1], CCmode)" "@