Message ID | f9a3f117-43b6-d7f4-bb5a-0cf5c512e61f@suse.com |
---|---|
State | New |
Headers | show |
Series | x86: fold two of vec_dupv2df<mask_name>'s alternatives | expand |
> -----Original Message----- > From: Jan Beulich <jbeulich@suse.com> > Sent: Tuesday, August 1, 2023 1:49 PM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao <hongtao.liu@intel.com>; Kirill Yukhin > <kirill.yukhin@gmail.com> > Subject: [PATCH] x86: fold two of vec_dupv2df<mask_name>'s alternatives > > By using Yvm in the source, both can be expressed in one. > > gcc/ > > * sse.md (vec_dupv2df<mask_name>): Fold the middle two of the > alternatives. Ok, thanks. > > --- a/gcc/config/i386/sse.md > +++ b/gcc/config/i386/sse.md > @@ -13784,21 +13784,20 @@ > (set_attr "mode" "DF,DF,V1DF,V1DF,V1DF,V2DF,V1DF,V1DF,V1DF")]) > > (define_insn "vec_dupv2df<mask_name>" > - [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,v") > + [(set (match_operand:V2DF 0 "register_operand" "=x,v,v") > (vec_duplicate:V2DF > - (match_operand:DF 1 "nonimmediate_operand" "0,xm,vm,vm")))] > + (match_operand:DF 1 "nonimmediate_operand" "0,Yvm,vm")))] > "TARGET_SSE2" > "@ > unpcklpd\t%0, %0 > %vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} > - vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} > vbroadcastsd\t{%1, }%g0<mask_operand2>{|, %1}" > - [(set_attr "isa" "noavx,sse3,avx512vl,*") > - (set_attr "type" "sselog1,ssemov,ssemov,ssemov") > - (set_attr "prefix" "orig,maybe_vex,evex,evex") > - (set_attr "mode" "V2DF,DF,DF,V8DF") > + [(set_attr "isa" "noavx,sse3,*") > + (set_attr "type" "sselog1,ssemov,ssemov") > + (set_attr "prefix" "orig,maybe_evex,evex") > + (set_attr "mode" "V2DF,DF,V8DF") > (set (attr "enabled") > - (cond [(eq_attr "alternative" "3") > + (cond [(eq_attr "alternative" "2") > (symbol_ref "TARGET_AVX512F && !TARGET_AVX512VL > && !TARGET_PREFER_AVX256") > (match_test "<mask_avx512vl_condition>")
--- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -13784,21 +13784,20 @@ (set_attr "mode" "DF,DF,V1DF,V1DF,V1DF,V2DF,V1DF,V1DF,V1DF")]) (define_insn "vec_dupv2df<mask_name>" - [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,v") + [(set (match_operand:V2DF 0 "register_operand" "=x,v,v") (vec_duplicate:V2DF - (match_operand:DF 1 "nonimmediate_operand" "0,xm,vm,vm")))] + (match_operand:DF 1 "nonimmediate_operand" "0,Yvm,vm")))] "TARGET_SSE2" "@ unpcklpd\t%0, %0 %vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} - vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1} vbroadcastsd\t{%1, }%g0<mask_operand2>{|, %1}" - [(set_attr "isa" "noavx,sse3,avx512vl,*") - (set_attr "type" "sselog1,ssemov,ssemov,ssemov") - (set_attr "prefix" "orig,maybe_vex,evex,evex") - (set_attr "mode" "V2DF,DF,DF,V8DF") + [(set_attr "isa" "noavx,sse3,*") + (set_attr "type" "sselog1,ssemov,ssemov") + (set_attr "prefix" "orig,maybe_evex,evex") + (set_attr "mode" "V2DF,DF,V8DF") (set (attr "enabled") - (cond [(eq_attr "alternative" "3") + (cond [(eq_attr "alternative" "2") (symbol_ref "TARGET_AVX512F && !TARGET_AVX512VL && !TARGET_PREFER_AVX256") (match_test "<mask_avx512vl_condition>")