* [PATCH] x86: fold two of vec_dupv2df<mask_name>'s alternatives
@ 2023-08-01 5:49 Jan Beulich
2023-08-01 6:03 ` Liu, Hongtao
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2023-08-01 5:49 UTC (permalink / raw)
To: gcc-patches; +Cc: Hongtao Liu, Kirill Yukhin
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.
--- 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>")
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] x86: fold two of vec_dupv2df<mask_name>'s alternatives
2023-08-01 5:49 [PATCH] x86: fold two of vec_dupv2df<mask_name>'s alternatives Jan Beulich
@ 2023-08-01 6:03 ` Liu, Hongtao
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Hongtao @ 2023-08-01 6:03 UTC (permalink / raw)
To: Beulich, Jan, gcc-patches; +Cc: Kirill Yukhin
> -----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>")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-01 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 5:49 [PATCH] x86: fold two of vec_dupv2df<mask_name>'s alternatives Jan Beulich
2023-08-01 6:03 ` Liu, Hongtao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).