> From: Kumar, Venkataramanan <[email protected]>
> Sent: Friday, August 28, 2026 7:11 PM
> 
> > From: Haochen Jiang <[email protected]>
> > Sent: Wednesday, August 19, 2026 11:19 AM
> > diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-
> expand.cc
> > index e9bc4a7d8e6..bee8218dae9 100644
> > --- a/gcc/config/i386/i386-expand.cc
> > +++ b/gcc/config/i386/i386-expand.cc
> > @@ -14762,16 +14768,17 @@ ix86_expand_ace_builtin (const struct
> > builtin_description *d, tree exp,
> >        arg = CALL_EXPR_ARG (exp, i);
> >        op = ix86_expand_unsigned_small_int_cst_argument (arg);
> >
> > -      if (i == 0)
> > +      if (i == 0 || i == constant)
> >         {
> > -         /* This must be the tmm reg number constant.  */
> > +         /* This must be the constant.  */
> >           if (!insn_p->operand[i + arg_adjust].predicate(op, SImode))
> >             {
> >               error ("the argument must be constant");
> >               return const0_rtx;
> >             }
> 
> What happens if user passes _tile_op4bssd_epi32(100, src1, src2) it is
> matching const_0_to_7_operand and "the argument must be constant will be
> thrown right ??   we should get the "tmm register number argument must be
> between 0 to 7" error.

Hmm. I have changed the patch at the final minute due to this issue.
But not reflected here. The issue here is caused by an incorrectly ordered if,
where ...

> 
> >
> > -         if (!IN_RANGE (INTVAL (op), 0, 7))
> > +         /* This must be the tmm reg number constant.  */
> > +         if (i == 0 && !IN_RANGE (INTVAL (op), 0, 7))
> >             {
> >               error ("the tmm register number argument must be between 0 to
> > 7");
> >               return const0_rtx;

... this part should come first.

The final version will be:

      if (i == 0 || i == constant)
        {
          if (i == 0 && !IN_RANGE (INTVAL (op), 0, 7))
            {
              /* This must be the tmm reg number constant.  */
              error ("the tmm register number argument must be between 0 to 7");
              return const0_rtx;
            }
          else if (!insn_p->operand[i + arg_adjust].predicate(op, SImode))
            {
              /* This must be the constant.  */
              error ("the argument must be constant");
              return const0_rtx;
            }
        }

> > diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index
> > 6f3bf44b557..0a3ab0d29cc 100644
> > --- a/gcc/config/i386/sse.md
> > +++ b/gcc/config/i386/sse.md
> > @@ -320,6 +320,20 @@
> >    UNSPECV_BSRMOVL_LOAD
> >    UNSPECV_TILEMOVROWINSERT
> >    UNSPECV_TILEMOVCOLINSERT
> > +  UNSPECV_TOP2BF16PS
> > +  UNSPECV_TOP4BSSD
> > +  UNSPECV_TOP4BSSDS
> > +  UNSPECV_TOP4BSUD
> > +  UNSPECV_TOP4BSUDS
> > +  UNSPECV_TOP4BUSD
> > +  UNSPECV_TOP4BUSDS
> > +  UNSPECV_TOP4BUUD
> > +  UNSPECV_TOP4BUUDS
> > +  UNSPECV_TOP4MXBF8PS
> > +  UNSPECV_TOP4MXBHF8PS
> > +  UNSPECV_TOP4MXHBF8PS
> > +  UNSPECV_TOP4MXHF8PS
> > +  UNSPECV_TOP4MXBSSPS
> >  ])
> 
> I am not fining uses for these
> UNSPECV_TOP4BSSDS, UNSPECV_TOP4BSUDS, UNSPECV_TOP4BUSDS,
> UNSPECV_TOP4BUUDS

I will delete them.

Thx,
Haochen

Reply via email to