1 Upstream-Status: Inappropriate [Backport]
2 From ac4ab0911ae869e3cd4c00629e3c4d4d0b7e7aa6 Mon Sep 17 00:00:00 2001
3 From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
4 Date: Thu, 7 Apr 2011 20:46:50 +0000
5 Subject: [PATCH 081/200] * config/i386/sse.md: Update copyright year.
6 (avx_cmp<ssescalarmodesuffix><mode>3): Add missing output
8 (*vec_concatv2sf_avx): Fix wrong register constraint in
9 alternative 3 of operand 1.
10 (*vec_set<mode>_0_avx): Avoid combining registers from different
11 units in a single alternative.
12 (*vec_set<mode>_0_sse4_1): Ditto.
13 (*vec_set<mode>_0_sse2): Ditto.
14 (vec_set<mode>_0): Ditto.
15 (sse2_storehpd): Ditto.
16 (sse2_loadhpd): Ditto.
17 (sse4_1_insertps): Use nonimmediate_operand for operand 2.
18 * config/i386/predicates.md (sse_comparison_operator): Do not
19 define as special predicate.
21 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172126 138bc75d-0d04-0410-961f-82ee72b054a4
23 index 986856b..7cce9d4 100644
24 --- a/gcc/config/i386/predicates.md
25 +++ b/gcc/config/i386/predicates.md
27 ;; Return true if OP is a comparison that can be used in the CMPSS/CMPPS insns.
28 ;; The first set are supported directly; the second set can't be done with
29 ;; full IEEE support, i.e. NaNs.
31 -;; ??? It would seem that we have a lot of uses of this predicate that pass
32 -;; it the wrong mode. We got away with this because the old function didn't
33 -;; check the mode at all. Mirror that for now by calling this a special
36 -(define_special_predicate "sse_comparison_operator"
37 +(define_predicate "sse_comparison_operator"
38 (match_code "eq,lt,le,unordered,ne,unge,ungt,ordered"))
40 ;; Return true if OP is a comparison operator that can be issued by
41 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
42 index f4bea64..578ad82 100644
43 --- a/gcc/config/i386/sse.md
44 +++ b/gcc/config/i386/sse.md
46 ;; GCC machine description for SSE instructions
47 -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
48 +;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
49 ;; Free Software Foundation, Inc.
51 ;; This file is part of GCC.
53 (set_attr "mode" "<MODE>")])
55 (define_insn "avx_cmp<ssescalarmodesuffix><mode>3"
56 - [(set (match_operand:SSEMODEF2P 0 "register_operand" "")
57 + [(set (match_operand:SSEMODEF2P 0 "register_operand" "=x")
60 [(match_operand:SSEMODEF2P 1 "register_operand" "x")
62 (define_insn "*vec_concatv2sf_avx"
63 [(set (match_operand:V2SF 0 "register_operand" "=x,x,x,*y ,*y")
65 - (match_operand:SF 1 "nonimmediate_operand" " x,x,m, x , m")
66 + (match_operand:SF 1 "nonimmediate_operand" " x,x,m, 0 , m")
67 (match_operand:SF 2 "vector_move_operand" " x,m,C,*ym, C")))]
70 @@ -3935,13 +3935,15 @@
74 +;; Avoid combining registers from different units in a single alternative,
75 +;; see comment above inline_secondary_memory_needed function in i386.c
76 (define_insn "*vec_set<mode>_0_avx"
77 - [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x,x, x,x, x,m")
78 + [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x,x, x,x, x,m, m,m")
80 (vec_duplicate:SSEMODE4S
81 (match_operand:<ssescalarmode> 2
82 - "general_operand" " x,m,*r,x,*rm,x*rfF"))
83 - (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,x, x,0")
84 + "general_operand" " x,m,*r,x,*rm,x,*r,fF"))
85 + (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,x, x,0, 0,0")
89 @@ -3950,20 +3952,24 @@
90 vmovd\t{%2, %0|%0, %2}
91 vmovss\t{%2, %1, %0|%0, %1, %2}
92 vpinsrd\t{$0, %2, %1, %0|%0, %1, %2, 0}
96 - [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*")
97 - (set_attr "prefix_extra" "*,*,*,*,1,*")
98 - (set_attr "length_immediate" "*,*,*,*,1,*")
99 + [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*,*,*")
100 + (set_attr "prefix_extra" "*,*,*,*,1,*,*,*")
101 + (set_attr "length_immediate" "*,*,*,*,1,*,*,*")
102 (set_attr "prefix" "vex")
103 - (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*")])
104 + (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*,*,*")])
106 +;; Avoid combining registers from different units in a single alternative,
107 +;; see comment above inline_secondary_memory_needed function in i386.c
108 (define_insn "*vec_set<mode>_0_sse4_1"
109 - [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x,x, x,x, x,m")
110 + [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x,x, x,x, x, m,m")
112 (vec_duplicate:SSEMODE4S
113 (match_operand:<ssescalarmode> 2
114 - "general_operand" " x,m,*r,x,*rm,*rfF"))
115 - (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,0, 0,0")
116 + "general_operand" " x,m,*r,x,*rm,*r,fF"))
117 + (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,0, 0, 0,0")
121 @@ -3972,44 +3978,53 @@
122 movd\t{%2, %0|%0, %2}
123 movss\t{%2, %0|%0, %2}
124 pinsrd\t{$0, %2, %0|%0, %2, 0}
127 - [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*")
128 - (set_attr "prefix_extra" "*,*,*,*,1,*")
129 - (set_attr "length_immediate" "*,*,*,*,1,*")
130 - (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*")])
131 + [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*,*")
132 + (set_attr "prefix_extra" "*,*,*,*,1,*,*")
133 + (set_attr "length_immediate" "*,*,*,*,1,*,*")
134 + (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*,*")])
136 +;; Avoid combining registers from different units in a single alternative,
137 +;; see comment above inline_secondary_memory_needed function in i386.c
138 (define_insn "*vec_set<mode>_0_sse2"
139 - [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x, x,x,m")
140 + [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x, x,x,m, m,m")
142 (vec_duplicate:SSEMODE4S
143 (match_operand:<ssescalarmode> 2
144 - "general_operand" " m,*r,x,x*rfF"))
145 - (match_operand:SSEMODE4S 1 "vector_move_operand" " C, C,0,0")
146 + "general_operand" " m,*r,x,x,*r,fF"))
147 + (match_operand:SSEMODE4S 1 "vector_move_operand" " C, C,0,0, 0,0")
151 mov<ssescalarmodesuffix>\t{%2, %0|%0, %2}
152 movd\t{%2, %0|%0, %2}
153 movss\t{%2, %0|%0, %2}
157 [(set_attr "type" "ssemov")
158 - (set_attr "mode" "<ssescalarmode>,SI,SF,*")])
159 + (set_attr "mode" "<ssescalarmode>,SI,SF,*,*,*")])
161 +;; Avoid combining registers from different units in a single alternative,
162 +;; see comment above inline_secondary_memory_needed function in i386.c
163 (define_insn "vec_set<mode>_0"
164 - [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x,x,m")
165 + [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand" "=x,x,m, m,m")
167 (vec_duplicate:SSEMODE4S
168 (match_operand:<ssescalarmode> 2
169 - "general_operand" " m,x,x*rfF"))
170 - (match_operand:SSEMODE4S 1 "vector_move_operand" " C,0,0")
171 + "general_operand" " m,x,x,*r,fF"))
172 + (match_operand:SSEMODE4S 1 "vector_move_operand" " C,0,0, 0,0")
176 movss\t{%2, %0|%0, %2}
177 movss\t{%2, %0|%0, %2}
181 [(set_attr "type" "ssemov")
182 - (set_attr "mode" "SF,SF,*")])
183 + (set_attr "mode" "SF,SF,*,*,*")])
185 ;; A subset is vec_setv4sf.
186 (define_insn "*vec_setv4sf_avx"
187 @@ -4064,7 +4079,7 @@
189 (define_insn "sse4_1_insertps"
190 [(set (match_operand:V4SF 0 "register_operand" "=x")
191 - (unspec:V4SF [(match_operand:V4SF 2 "register_operand" "x")
192 + (unspec:V4SF [(match_operand:V4SF 2 "nonimmediate_operand" "xm")
193 (match_operand:V4SF 1 "register_operand" "0")
194 (match_operand:SI 3 "const_0_to_255_operand" "n")]
196 @@ -4811,6 +4826,8 @@
197 (set_attr "prefix" "vex")
198 (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
200 +;; Avoid combining registers from different units in a single alternative,
201 +;; see comment above inline_secondary_memory_needed function in i386.c
202 (define_insn "sse2_storehpd"
203 [(set (match_operand:DF 0 "nonimmediate_operand" "=m,x,x,*f,r")
205 @@ -4912,6 +4929,8 @@
206 (set_attr "prefix" "vex")
207 (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
209 +;; Avoid combining registers from different units in a single alternative,
210 +;; see comment above inline_secondary_memory_needed function in i386.c
211 (define_insn "sse2_loadhpd"
212 [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,x,o,o,o")
214 @@ -4983,6 +5002,8 @@
215 (set_attr "prefix" "vex")
216 (set_attr "mode" "DF,V1DF,V1DF,V1DF,DF,DF,DF")])
218 +;; Avoid combining registers from different units in a single alternative,
219 +;; see comment above inline_secondary_memory_needed function in i386.c
220 (define_insn "sse2_loadlpd"
221 [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,x,x,x,m,m,m")