* [PATCH, i386]: Allow direct XMM->GR zero extensions for 32bit targets
@ 2017-05-31 18:48 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2017-05-31 18:48 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
Hello!
Attached patch allows direct XMM->GR zero extensions for 32bit
targets. This insn will be split after reload to a direct
XMM->lowpart(GR) move and 0->highpart(GR) zeroing.
2017-05-31 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
also for 32bit target. Update insn attributes.
(zero-extendsidi2 splitter): Allow all registers for operand 1.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
Committed to mainline SVN.
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1627 bytes --]
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 248692)
+++ config/i386/i386.md (working copy)
@@ -3843,7 +3843,7 @@
[(set (attr "isa")
(cond [(eq_attr "alternative" "0,1,2")
(const_string "nox64")
- (eq_attr "alternative" "3,7")
+ (eq_attr "alternative" "3")
(const_string "x64")
(eq_attr "alternative" "9")
(const_string "sse2")
@@ -3860,7 +3860,11 @@
(const_string "multi")
(eq_attr "alternative" "5,6")
(const_string "mmxmov")
- (eq_attr "alternative" "7,8,9,10,11")
+ (eq_attr "alternative" "7")
+ (if_then_else (match_test "TARGET_64BIT")
+ (const_string "ssemov")
+ (const_string "multi"))
+ (eq_attr "alternative" "8,9,10,11")
(const_string "ssemov")
(eq_attr "alternative" "12")
(const_string "mskmov")
@@ -3881,8 +3885,11 @@
(set (attr "mode")
(cond [(eq_attr "alternative" "5,6")
(const_string "DI")
- (eq_attr "alternative" "7,8,10,11")
+ (and (eq_attr "alternative" "7")
+ (match_test "TARGET_64BIT"))
(const_string "TI")
+ (eq_attr "alternative" "8,10,11")
+ (const_string "TI")
]
(const_string "SI")))])
@@ -3903,7 +3910,7 @@
(define_split
[(set (match_operand:DI 0 "nonimmediate_gr_operand")
- (zero_extend:DI (match_operand:SI 1 "nonimmediate_gr_operand")))]
+ (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand")))]
"!TARGET_64BIT && reload_completed
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))"
[(set (match_dup 3) (match_dup 1))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-31 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 18:48 [PATCH, i386]: Allow direct XMM->GR zero extensions 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).