On Fri, 2013-08-16 at 23:25 +0200, Jakub Jelinek wrote:
> On Fri, Aug 16, 2013 at 04:18:18PM -0500, Peter Bergner wrote:
> > --- gcc/config/rs6000/dfp.md        (revision 201779)
> > +++ gcc/config/rs6000/dfp.md        (working copy)
> > @@ -132,11 +132,14 @@ (define_expand "negtd2"
> >    "")
> >  
> >  (define_insn "*negtd2_fpr"
> > -  [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
> > -   (neg:TD (match_operand:TD 1 "gpc_reg_operand" "d")))]
> > +  [(set (match_operand:TD 0 "gpc_reg_operand" "=d,d")
> > +   (neg:TD (match_operand:TD 1 "gpc_reg_operand" "d,0")))]
> 
> I'm surprised if it works in this order, I'd expect that alternative 0
> would match even for the same regno and that the second alternative wouldn't
> be tried.

It did that way because I thought that was the order they had to be in
due to this in the internals doc:

  ‘0’, ‘1’, ‘2’, ... ‘9’
        An operand that matches the specified operand number is allowed.
        If a digit is used together with letters within the same
        alternative, the digit should come last.

I see I missed the "within the same alternative" and yeah, I guess
I'm a little surprised the first alternative didn't kick in now too.
I'll swap them to be sure and I'll add a couple of extra routines
in the tests that test both alternatives.

Peter



Reply via email to