AMD General Hi,
> -----Original Message----- > From: Jiang, Haochen <[email protected]> > Sent: 21 July 2026 09:05 > To: Sharma, Dipesh <[email protected]>; [email protected] > Cc: Liu, Hongtao <[email protected]>; [email protected]; > [email protected]; Kumar, Venkataramanan > <[email protected]> > Subject: RE: [PATCH v2 4/7] [X86]: Add FP8 to FP32 converts. > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > > From: Dipesh Sharma <[email protected]> > > Sent: Monday, July 20, 2026 2:24 AM > > > > diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index > > 234acd7aa21..1583c59db3b 100644 > > --- a/gcc/config/i386/sse.md > > +++ b/gcc/config/i386/sse.md > > @@ -270,6 +270,8 @@ > > UNSPEC_VCVTBIASPS2BF8S > > UNSPEC_VCVTBIASPS2HF8 > > UNSPEC_VCVTBIASPS2HF8S > > + UNSPEC_VCVTBF82PS > > + UNSPEC_VCVTHF82PS > > ]) > > > > (define_c_enum "unspecv" [ > > @@ -34352,3 +34354,29 @@ > > > > "vcvt<biasps2fp8>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, > % 1, > > %2}" > > [(set_attr "prefix" "evex") > > (set_attr "mode" "V16SF")]) > > + > > +;; FP8 to FP32 converts (VCVTBF82PS, VCVTHF82PS) > > + > > +(define_int_iterator UNSPEC_CONVERTFP82PS > > + [UNSPEC_VCVTBF82PS UNSPEC_VCVTHF82PS]) > > + > > +(define_int_attr convertfp82ps > > + [(UNSPEC_VCVTBF82PS "bf82ps") > > + (UNSPEC_VCVTHF82PS "hf82ps")]) > > + > > +(define_mode_iterator FP82PS_MODE [V4SF V8SF V16SF]) > > + > > +(define_mode_attr ssebvecmode_3 > > + [(V4SF "V16QI") (V8SF "V16QI") (V16SF "V16QI")]) > > You don't need these two iter. Simply use VF1_AVX512VL and V16QI is > enough. Sure. > > > + > > +(define_mode_attr iptrssebvec_3 > > + [(V4SF "k") (V8SF "q") (V16SF "")]) > > + > > +(define_insn "vcvt<convertfp82ps><mode><mask_name>" > > + [(set (match_operand:FP82PS_MODE 0 "register_operand" "=v") > > + (unspec:FP82PS_MODE > > + [(match_operand:<ssebvecmode_3> 1 "nonimmediate_operand" > > "vm")] > > + UNSPEC_CONVERTFP82PS))] > > + "TARGET_AVX10V2AUX" > > + > > "vcvt<convertfp82ps>\t{%1, > %0<mask_operand2>|%0<mask_operand2>,%<i > > ptrssebvec_3>1}" > > + [(set_attr "prefix" "evex")]) > > Thx, > Haochen
