public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2631] x86: slightly enhance "vec_dupv2df<mask_name>"
@ 2023-07-19 8:12 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-07-19 8:12 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fba96fd1b94bc9cd35302611be3ace0e21c97d6c
commit r14-2631-gfba96fd1b94bc9cd35302611be3ace0e21c97d6c
Author: Jan Beulich <jbeulich@suse.com>
Date: Wed Jul 19 10:11:11 2023 +0200
x86: slightly enhance "vec_dupv2df<mask_name>"
Introduce a new alternative permitting all 32 registers to be used as
source without AVX512VL, by broadcasting to the full 512 bits in that
case. (The insn would also permit all registers to be used as
destination, but V2DFmode doesn't.)
gcc/
* config/i386/sse.md (vec_dupv2df<mask_name>): Add new AVX512F
alternative. Move AVX512VL part of condition to new "enabled"
attribute.
Diff:
---
gcc/config/i386/sse.md | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 2d81347c7b6..35fd66ed4aa 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -13784,18 +13784,27 @@
(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")
+ [(set (match_operand:V2DF 0 "register_operand" "=x,x,v,v")
(vec_duplicate:V2DF
- (match_operand:DF 1 "nonimmediate_operand" " 0,xm,vm")))]
- "TARGET_SSE2 && <mask_avx512vl_condition>"
+ (match_operand:DF 1 "nonimmediate_operand" "0,xm,vm,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}"
- [(set_attr "isa" "noavx,sse3,avx512vl")
- (set_attr "type" "sselog1")
- (set_attr "prefix" "orig,maybe_vex,evex")
- (set_attr "mode" "V2DF,DF,DF")])
+ 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 "enabled")
+ (cond [(eq_attr "alternative" "3")
+ (symbol_ref "TARGET_AVX512F && !TARGET_AVX512VL
+ && !TARGET_PREFER_AVX256")
+ (match_test "<mask_avx512vl_condition>")
+ (const_string "*")
+ ]
+ (symbol_ref "false")))])
(define_insn "vec_concatv2df"
[(set (match_operand:V2DF 0 "register_operand" "=x,x,v,x,x, v,x,x")
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-19 8:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 8:12 [gcc r14-2631] x86: slightly enhance "vec_dupv2df<mask_name>" Jan Beulich
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).