On Wed, Mar 16, 2022 at 03:06:42PM -0500, will schmidt wrote:
> On Wed, 2022-03-16 at 13:12 -0500, Segher Boessenkool wrote:
> > (define_insn "addg6s"
> >   [(set (match_operand:GPR 0 "register_operand" "=r")
> >     (unspec:GPR [(match_operand:GPR 1 "register_operand" "r")
> >                  (match_operand:GPR 2 "register_operand" "r")]
> >                 UNSPEC_ADDG6S))]
> >   "TARGET_POPCNTD"
> >   "addg6s %0,%1,%2"
> >   [(set_attr "type" "integer")])
> > You do not need multiple unspec numbers.  You can differentiate
> them
> > based on the modes of the arguments, already :-)
> 
> Yeah, Thats what I thought, which is a big part of why I posted this
> with RFC. :-)    When I attempted this there was an issue with multiple
> <mode>s (behind the GPR predicate) versus the singular "addg6s"
> define_insn.  
> It's possible I had something else wrong there, but I'll
> go back to that attempt and work in that direction.

No, that is still there.  One way out is to make this an unnamed pattern
(like "*addg6s").  Another is to put the mode in the name, and then you
probably want to make it a parameterized name as well, which then hides
all that again:

(define_insn "@addg6s"
  ...

> > > +/* { dg-require-effective-target powerpc_vsx_ok } */
> > 
> > That is the wrong requirement.  You want to test for Power7, not for
> > VSX.  I realise you probably copied this from elsewhere :-(  (If from
> > another addg6s testcase, just keep it).
> 
> Because reasons. :-)   The stanzas are copied from the nearby bcd-1.c
> testcase that has a simpler test for addg6s.    Given the input I'll
> try to correct the stanzas here and limit how much error I carry along.

If you do not improve the existing ones it may be best to just keep this
the same in the new testcases as well.  Consistency is a good thing.
Consistent wrong is not so great of course :-)


Segher

Reply via email to