* [PATCH, i386]: PR 68924, improve *vec_extractv2di_0_sse for 32bit targets
@ 2019-03-11 2:43 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2019-03-11 2:43 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
This patch implements additional suggestion from PR 68924. The patch
avoids memory for DImode extracts from V2DImode for SSE4.1 targets.
2019-03-10 Uroš Bizjak <ubizjak@gmail.com>
PR target/68924
* config/i386/sse.md (*vec_extractv2di_0_sse):
Add (=r,x) alternative and corresponding splitter.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
Committed to mainline SVN.
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1566 bytes --]
Index: config/i386/sse.md
===================================================================
--- config/i386/sse.md (revision 269560)
+++ config/i386/sse.md (working copy)
@@ -14308,15 +14308,39 @@
(symbol_ref "true")))])
(define_insn "*vec_extractv2di_0_sse"
- [(set (match_operand:DI 0 "nonimmediate_operand" "=v,m")
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,x ,m")
(vec_select:DI
- (match_operand:V2DI 1 "nonimmediate_operand" "vm,v")
+ (match_operand:V2DI 1 "nonimmediate_operand" " x,xm,x")
(parallel [(const_int 0)])))]
"TARGET_SSE && !TARGET_64BIT
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))"
- "#")
+ "#"
+ [(set_attr "isa" "sse4,*,*")
+ (set (attr "preferred_for_speed")
+ (cond [(eq_attr "alternative" "0")
+ (symbol_ref "TARGET_INTER_UNIT_MOVES_FROM_VEC")
+ ]
+ (symbol_ref "true")))])
(define_split
+ [(set (match_operand:DI 0 "general_reg_operand")
+ (vec_select:DI
+ (match_operand:V2DI 1 "register_operand")
+ (parallel [(const_int 0)])))]
+ "TARGET_SSE4_1 && !TARGET_64BIT
+ && reload_completed"
+ [(set (match_dup 2) (match_dup 4))
+ (set (match_dup 3)
+ (vec_select:SI
+ (match_dup 5)
+ (parallel [(const_int 1)])))]
+{
+ operands[4] = gen_lowpart (SImode, operands[1]);
+ operands[5] = gen_lowpart (V4SImode, operands[1]);
+ split_double_mode (DImode, &operands[0], 1, &operands[2], &operands[3]);
+})
+
+(define_split
[(set (match_operand:SWI48x 0 "nonimmediate_operand")
(vec_select:SWI48x
(match_operand:<ssevecmode> 1 "register_operand")
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-10 23:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 2:43 [PATCH, i386]: PR 68924, improve *vec_extractv2di_0_sse for 32bit targets Uros Bizjak
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).