AMD General Hi,
> -----Original Message----- > From: Jiang, Haochen <[email protected]> > Sent: 29 June 2026 13:34 > To: Sharma, Dipesh <[email protected]>; [email protected] > Cc: [email protected]; Kumar, Venkataramanan > <[email protected]>; [email protected] > Subject: RE: [PATCH 07/10] x86: Added Sub-byte element extration and > Symmetric signed saturation narrow support for AVX10_V2_AUX. > > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. > > > > From: Dipesh Sharma <[email protected]> > > Sent: Friday, June 26, 2026 8:16 PM > > > > diff --git a/gcc/config/i386/i386-expand.cc > > b/gcc/config/i386/i386-expand.cc index c56fc8e8d34..e8f44752607 100644 > > --- a/gcc/config/i386/i386-expand.cc > > +++ b/gcc/config/i386/i386-expand.cc > > @@ -12710,6 +12710,9 @@ ix86_expand_args_builtin (const struct > > builtin_description *d, > > case UHI_FTYPE_UHI_UQI: > > case USI_FTYPE_USI_UQI: > > case UDI_FTYPE_UDI_UQI: > > + case V16QI_FTYPE_V16QI_INT: > > + case V32QI_FTYPE_V32QI_INT: > > + case V64QI_FTYPE_V64QI_INT: > > nargs = 2; > > nargs_constant = 1; > > break; > > @@ -13161,6 +13164,9 @@ ix86_expand_args_builtin (const struct > > builtin_description *d, > > case V4DF_FTYPE_V8DF_INT_V4DF_UQI: > > case V4SF_FTYPE_V16SF_INT_V4SF_UQI: > > case V8DI_FTYPE_V8DI_INT_V8DI_UQI: > > + case V16QI_FTYPE_V16QI_INT_V16QI_UHI: > > + case V32QI_FTYPE_V32QI_INT_V32QI_USI: > > + case V64QI_FTYPE_V64QI_INT_V64QI_UDI: > > nargs = 4; > > mask_pos = 2; > > nargs_constant = 1; > > One more thing, you could restrict upackb immediate value in this function > just like some other insts did. Will add a restrict here. However, based on SPEC, the range of imm here is [8,63]. Hence adding a predicate "const_8_to_63_operand" would also be required, else a default range of [0,255] may also lead to unexpected behaviour. > > Thx, > Haochen Thanks, Dipesh
