summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2010-11-02 22:03:58 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2010-11-02 22:12:02 +0100
commitbe10a6b1321f250b1034c7d9d0a8ef18b296eef1 (patch)
tree9249025cbfbfbee4cc430d62b27f75301dd4dfde /recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch
parent93b28937ac67ba46d65f55637e42552e224aa7e2 (diff)
downloadmeta-openembedded-be10a6b1321f250b1034c7d9d0a8ef18b296eef1.tar.gz
angstrom-layers: meta-openembedded: replace poky gcc 4.5 sources with OE ones
This needs further investigation, but for now we can get the tested sources into the poky gcc harness Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch')
-rw-r--r--recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch511
1 files changed, 511 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch
new file mode 100644
index 0000000000..8ae781ecab
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99364.patch
@@ -0,0 +1,511 @@
12010-08-05 Julian Brown <julian@codesourcery.com>
2
3 Backport from mainline (candidate patch):
4
5 gcc/
6 * expr.c (expand_assignment): Add assertion to prevent emitting null
7 rtx for movmisalign pattern.
8 (expand_expr_real_1): Likewise.
9 * config/arm/arm.c (arm_builtin_support_vector_misalignment): New.
10 (TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT): New. Use above.
11 (arm_vector_alignment_reachable): New.
12 (TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE): New. Use above.
13 (neon_vector_mem_operand): Disallow PRE_DEC for misaligned loads.
14 (arm_print_operand): Include alignment qualifier in %A.
15 * config/arm/neon.md (UNSPEC_MISALIGNED_ACCESS): New constant.
16 (movmisalign<mode>): New expander.
17 (movmisalign<mode>_neon_store, movmisalign<mode>_neon_load): New
18 insn patterns.
19
20 gcc/testsuite/
21 * gcc.dg/vect/vect-42.c: Use vect_element_align instead of
22 vect_hw_misalign.
23 * gcc.dg/vect/vect-60.c: Likewise.
24 * gcc.dg/vect/vect-56.c: Likewise.
25 * gcc.dg/vect/vect-93.c: Likewise.
26 * gcc.dg/vect/no-scevccp-outer-8.c: Likewise.
27 * gcc.dg/vect/vect-95.c: Likewise.
28 * gcc.dg/vect/vect-96.c: Likewise.
29 * gcc.dg/vect/vect-outer-5.c: Use quad-word vectors when available.
30 * gcc.dg/vect/slp-25.c: Likewise.
31 * gcc.dg/vect/slp-3.c: Likewise.
32 * gcc.dg/vect/vect-multitypes-1.c: Likewise.
33 * gcc.dg/vect/no-vfa-pr29145.c: Likewise.
34 * gcc.dg/vect/vect-multitypes-4.c: Likewise. Use vect_element_align.
35 * gcc.dg/vect/vect-109.c: Likewise.
36 * gcc.dg/vect/vect-peel-1.c: Likewise.
37 * gcc.dg/vect/vect-peel-2.c: Likewise.
38 * lib/target-supports.exp
39 (check_effective_target_arm_vect_no_misalign): New.
40 (check_effective_target_vect_no_align): Use above.
41 (check_effective_target_vect_element_align): New.
42 (add_options_for_quad_vectors): New.
43
44 2010-08-05 Jie Zhang <jie@codesourcery.com>
45
46 Issue #7257
47
48=== modified file 'gcc/config/arm/arm.c'
49--- old/gcc/config/arm/arm.c 2010-08-16 09:41:58 +0000
50+++ new/gcc/config/arm/arm.c 2010-08-20 16:21:01 +0000
51@@ -228,6 +228,11 @@
52 static void arm_trampoline_init (rtx, tree, rtx);
53 static rtx arm_trampoline_adjust_address (rtx);
54 static rtx arm_pic_static_addr (rtx orig, rtx reg);
55+static bool arm_vector_alignment_reachable (const_tree type, bool is_packed);
56+static bool arm_builtin_support_vector_misalignment (enum machine_mode mode,
57+ const_tree type,
58+ int misalignment,
59+ bool is_packed);
60
61
62 /* Table of machine attributes. */
63@@ -514,6 +519,14 @@
64 #undef TARGET_CAN_ELIMINATE
65 #define TARGET_CAN_ELIMINATE arm_can_eliminate
66
67+#undef TARGET_VECTOR_ALIGNMENT_REACHABLE
68+#define TARGET_VECTOR_ALIGNMENT_REACHABLE \
69+ arm_vector_alignment_reachable
70+
71+#undef TARGET_SUPPORT_VECTOR_MISALIGNMENT
72+#define TARGET_SUPPORT_VECTOR_MISALIGNMENT \
73+ arm_builtin_support_vector_misalignment
74+
75 struct gcc_target targetm = TARGET_INITIALIZER;
76
77 /* Obstack for minipool constant handling. */
78@@ -9084,7 +9097,8 @@
79 return arm_address_register_rtx_p (ind, 0);
80
81 /* Allow post-increment with Neon registers. */
82- if (type != 1 && (GET_CODE (ind) == POST_INC || GET_CODE (ind) == PRE_DEC))
83+ if ((type != 1 && GET_CODE (ind) == POST_INC)
84+ || (type == 0 && GET_CODE (ind) == PRE_DEC))
85 return arm_address_register_rtx_p (XEXP (ind, 0), 0);
86
87 /* FIXME: vld1 allows register post-modify. */
88@@ -16365,6 +16379,8 @@
89 {
90 rtx addr;
91 bool postinc = FALSE;
92+ unsigned align, modesize, align_bits;
93+
94 gcc_assert (GET_CODE (x) == MEM);
95 addr = XEXP (x, 0);
96 if (GET_CODE (addr) == POST_INC)
97@@ -16372,7 +16388,29 @@
98 postinc = 1;
99 addr = XEXP (addr, 0);
100 }
101- asm_fprintf (stream, "[%r]", REGNO (addr));
102+ asm_fprintf (stream, "[%r", REGNO (addr));
103+
104+ /* We know the alignment of this access, so we can emit a hint in the
105+ instruction (for some alignments) as an aid to the memory subsystem
106+ of the target. */
107+ align = MEM_ALIGN (x) >> 3;
108+ modesize = GET_MODE_SIZE (GET_MODE (x));
109+
110+ /* Only certain alignment specifiers are supported by the hardware. */
111+ if (modesize == 16 && (align % 32) == 0)
112+ align_bits = 256;
113+ else if ((modesize == 8 || modesize == 16) && (align % 16) == 0)
114+ align_bits = 128;
115+ else if ((align % 8) == 0)
116+ align_bits = 64;
117+ else
118+ align_bits = 0;
119+
120+ if (align_bits != 0)
121+ asm_fprintf (stream, ", :%d", align_bits);
122+
123+ asm_fprintf (stream, "]");
124+
125 if (postinc)
126 fputs("!", stream);
127 }
128@@ -22450,4 +22488,43 @@
129 return !TARGET_THUMB1;
130 }
131
132+static bool
133+arm_vector_alignment_reachable (const_tree type, bool is_packed)
134+{
135+ /* Vectors which aren't in packed structures will not be less aligned than
136+ the natural alignment of their element type, so this is safe. */
137+ if (TARGET_NEON && !BYTES_BIG_ENDIAN)
138+ return !is_packed;
139+
140+ return default_builtin_vector_alignment_reachable (type, is_packed);
141+}
142+
143+static bool
144+arm_builtin_support_vector_misalignment (enum machine_mode mode,
145+ const_tree type, int misalignment,
146+ bool is_packed)
147+{
148+ if (TARGET_NEON && !BYTES_BIG_ENDIAN)
149+ {
150+ HOST_WIDE_INT align = TYPE_ALIGN_UNIT (type);
151+
152+ if (is_packed)
153+ return align == 1;
154+
155+ /* If the misalignment is unknown, we should be able to handle the access
156+ so long as it is not to a member of a packed data structure. */
157+ if (misalignment == -1)
158+ return true;
159+
160+ /* Return true if the misalignment is a multiple of the natural alignment
161+ of the vector's element type. This is probably always going to be
162+ true in practice, since we've already established that this isn't a
163+ packed access. */
164+ return ((misalignment % align) == 0);
165+ }
166+
167+ return default_builtin_support_vector_misalignment (mode, type, misalignment,
168+ is_packed);
169+}
170+
171 #include "gt-arm.h"
172
173=== modified file 'gcc/config/arm/neon.md'
174--- old/gcc/config/arm/neon.md 2010-08-13 11:40:17 +0000
175+++ new/gcc/config/arm/neon.md 2010-08-20 16:21:01 +0000
176@@ -140,7 +140,8 @@
177 (UNSPEC_VUZP1 201)
178 (UNSPEC_VUZP2 202)
179 (UNSPEC_VZIP1 203)
180- (UNSPEC_VZIP2 204)])
181+ (UNSPEC_VZIP2 204)
182+ (UNSPEC_MISALIGNED_ACCESS 205)])
183
184 ;; Double-width vector modes.
185 (define_mode_iterator VD [V8QI V4HI V2SI V2SF])
186@@ -660,6 +661,52 @@
187 neon_disambiguate_copy (operands, dest, src, 4);
188 })
189
190+(define_expand "movmisalign<mode>"
191+ [(set (match_operand:VDQX 0 "nonimmediate_operand" "")
192+ (unspec:VDQX [(match_operand:VDQX 1 "general_operand" "")]
193+ UNSPEC_MISALIGNED_ACCESS))]
194+ "TARGET_NEON && !BYTES_BIG_ENDIAN"
195+{
196+ /* This pattern is not permitted to fail during expansion: if both arguments
197+ are non-registers (e.g. memory := constant, which can be created by the
198+ auto-vectorizer), force operand 1 into a register. */
199+ if (!s_register_operand (operands[0], <MODE>mode)
200+ && !s_register_operand (operands[1], <MODE>mode))
201+ operands[1] = force_reg (<MODE>mode, operands[1]);
202+})
203+
204+(define_insn "*movmisalign<mode>_neon_store"
205+ [(set (match_operand:VDX 0 "memory_operand" "=Um")
206+ (unspec:VDX [(match_operand:VDX 1 "s_register_operand" " w")]
207+ UNSPEC_MISALIGNED_ACCESS))]
208+ "TARGET_NEON && !BYTES_BIG_ENDIAN"
209+ "vst1.<V_sz_elem>\t{%P1}, %A0"
210+ [(set_attr "neon_type" "neon_vst1_1_2_regs_vst2_2_regs")])
211+
212+(define_insn "*movmisalign<mode>_neon_load"
213+ [(set (match_operand:VDX 0 "s_register_operand" "=w")
214+ (unspec:VDX [(match_operand:VDX 1 "memory_operand" " Um")]
215+ UNSPEC_MISALIGNED_ACCESS))]
216+ "TARGET_NEON && !BYTES_BIG_ENDIAN"
217+ "vld1.<V_sz_elem>\t{%P0}, %A1"
218+ [(set_attr "neon_type" "neon_vld1_1_2_regs")])
219+
220+(define_insn "*movmisalign<mode>_neon_store"
221+ [(set (match_operand:VQX 0 "memory_operand" "=Um")
222+ (unspec:VQX [(match_operand:VQX 1 "s_register_operand" " w")]
223+ UNSPEC_MISALIGNED_ACCESS))]
224+ "TARGET_NEON && !BYTES_BIG_ENDIAN"
225+ "vst1.<V_sz_elem>\t{%q1}, %A0"
226+ [(set_attr "neon_type" "neon_vst1_1_2_regs_vst2_2_regs")])
227+
228+(define_insn "*movmisalign<mode>_neon_load"
229+ [(set (match_operand:VQX 0 "s_register_operand" "=w")
230+ (unspec:VQX [(match_operand:VQX 1 "memory_operand" " Um")]
231+ UNSPEC_MISALIGNED_ACCESS))]
232+ "TARGET_NEON && !BYTES_BIG_ENDIAN"
233+ "vld1.<V_sz_elem>\t{%q0}, %A1"
234+ [(set_attr "neon_type" "neon_vld1_1_2_regs")])
235+
236 (define_insn "vec_set<mode>_internal"
237 [(set (match_operand:VD 0 "s_register_operand" "=w")
238 (vec_merge:VD
239
240=== modified file 'gcc/expr.c'
241--- old/gcc/expr.c 2010-08-12 13:51:16 +0000
242+++ new/gcc/expr.c 2010-08-20 16:21:01 +0000
243@@ -4362,7 +4362,10 @@
244 && op_mode1 != VOIDmode)
245 reg = copy_to_mode_reg (op_mode1, reg);
246
247- insn = GEN_FCN (icode) (mem, reg);
248+ insn = GEN_FCN (icode) (mem, reg);
249+ /* The movmisalign<mode> pattern cannot fail, else the assignment would
250+ silently be omitted. */
251+ gcc_assert (insn != NULL_RTX);
252 emit_insn (insn);
253 return;
254 }
255@@ -8742,6 +8745,7 @@
256
257 /* Nor can the insn generator. */
258 insn = GEN_FCN (icode) (reg, temp);
259+ gcc_assert (insn != NULL_RTX);
260 emit_insn (insn);
261
262 return reg;
263
264=== modified file 'gcc/testsuite/gcc.dg/vect/no-scevccp-outer-8.c'
265--- old/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-8.c 2009-06-05 14:28:50 +0000
266+++ new/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-8.c 2010-08-20 16:21:01 +0000
267@@ -46,5 +46,5 @@
268 return 0;
269 }
270
271-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! { vect_hw_misalign } } } } } */
272+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! { vect_element_align } } } } } */
273 /* { dg-final { cleanup-tree-dump "vect" } } */
274
275=== modified file 'gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c'
276--- old/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c 2008-08-18 19:36:03 +0000
277+++ new/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c 2010-08-20 16:21:01 +0000
278@@ -1,4 +1,5 @@
279 /* { dg-require-effective-target vect_int } */
280+/* { dg-add-options quad_vectors } */
281
282 #include <stdarg.h>
283 #include "tree-vect.h"
284
285=== modified file 'gcc/testsuite/gcc.dg/vect/slp-25.c'
286--- old/gcc/testsuite/gcc.dg/vect/slp-25.c 2009-10-27 11:46:07 +0000
287+++ new/gcc/testsuite/gcc.dg/vect/slp-25.c 2010-08-20 16:21:01 +0000
288@@ -1,4 +1,5 @@
289 /* { dg-require-effective-target vect_int } */
290+/* { dg-add-options quad_vectors } */
291
292 #include <stdarg.h>
293 #include "tree-vect.h"
294
295=== modified file 'gcc/testsuite/gcc.dg/vect/slp-3.c'
296--- old/gcc/testsuite/gcc.dg/vect/slp-3.c 2009-05-12 13:05:28 +0000
297+++ new/gcc/testsuite/gcc.dg/vect/slp-3.c 2010-08-20 16:21:01 +0000
298@@ -1,4 +1,5 @@
299 /* { dg-require-effective-target vect_int } */
300+/* { dg-add-options quad_vectors } */
301
302 #include <stdarg.h>
303 #include <stdio.h>
304
305=== modified file 'gcc/testsuite/gcc.dg/vect/vect-109.c'
306--- old/gcc/testsuite/gcc.dg/vect/vect-109.c 2010-07-10 20:38:32 +0000
307+++ new/gcc/testsuite/gcc.dg/vect/vect-109.c 2010-08-20 16:21:01 +0000
308@@ -1,4 +1,5 @@
309 /* { dg-require-effective-target vect_int } */
310+/* { dg-add-options quad_vectors } */
311
312 #include <stdarg.h>
313 #include "tree-vect.h"
314@@ -72,8 +73,8 @@
315 return 0;
316 }
317
318-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_hw_misalign } } } */
319-/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 2 "vect" { xfail vect_hw_misalign } } } */
320-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 10 "vect" { target vect_hw_misalign } } } */
321+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_element_align } } } */
322+/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 2 "vect" { xfail vect_element_align } } } */
323+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 10 "vect" { target vect_element_align } } } */
324 /* { dg-final { cleanup-tree-dump "vect" } } */
325
326
327=== modified file 'gcc/testsuite/gcc.dg/vect/vect-42.c'
328--- old/gcc/testsuite/gcc.dg/vect/vect-42.c 2009-11-04 10:22:22 +0000
329+++ new/gcc/testsuite/gcc.dg/vect/vect-42.c 2010-08-20 16:21:01 +0000
330@@ -64,7 +64,7 @@
331
332 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
333 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } } */
334-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_hw_misalign } } } } } */
335+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_element_align } } } } } */
336 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || { ! vector_alignment_reachable } } } } } */
337 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || { ! vector_alignment_reachable } } } } } */
338 /* { dg-final { cleanup-tree-dump "vect" } } */
339
340=== modified file 'gcc/testsuite/gcc.dg/vect/vect-95.c'
341--- old/gcc/testsuite/gcc.dg/vect/vect-95.c 2009-10-27 11:46:07 +0000
342+++ new/gcc/testsuite/gcc.dg/vect/vect-95.c 2010-08-20 16:21:01 +0000
343@@ -56,14 +56,14 @@
344 }
345
346 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
347-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail {vect_hw_misalign} } } } */
348+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail {vect_element_align} } } } */
349
350 /* For targets that support unaligned loads we version for the two unaligned
351 stores and generate misaligned accesses for the loads. For targets that
352 don't support unaligned loads we version for all four accesses. */
353
354-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_hw_misalign} } } } */
355-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
356+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align} } } } */
357+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
358 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } } */
359 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target vect_no_align } } } */
360 /* { dg-final { cleanup-tree-dump "vect" } } */
361
362=== modified file 'gcc/testsuite/gcc.dg/vect/vect-96.c'
363--- old/gcc/testsuite/gcc.dg/vect/vect-96.c 2009-10-27 11:46:07 +0000
364+++ new/gcc/testsuite/gcc.dg/vect/vect-96.c 2010-08-20 16:21:01 +0000
365@@ -45,5 +45,5 @@
366 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
367 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
368 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {! vector_alignment_reachable} } } } } */
369-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } } */
370+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
371 /* { dg-final { cleanup-tree-dump "vect" } } */
372
373=== modified file 'gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c'
374--- old/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c 2009-10-27 11:46:07 +0000
375+++ new/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c 2010-08-20 16:21:01 +0000
376@@ -1,4 +1,5 @@
377 /* { dg-require-effective-target vect_int } */
378+/* { dg-add-options quad_vectors } */
379
380 #include <stdarg.h>
381 #include "tree-vect.h"
382@@ -78,11 +79,11 @@
383 return 0;
384 }
385
386-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail {! vect_hw_misalign} } } } */
387-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
388-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {! vect_hw_misalign} } } } */
389-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
390+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail {! vect_element_align} } } } */
391+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || vect_element_align } } } } */
392+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {! vect_element_align} } } } */
393+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || vect_element_align } } } } */
394 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail *-*-* } } } */
395-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
396+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
397 /* { dg-final { cleanup-tree-dump "vect" } } */
398
399
400=== modified file 'gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c'
401--- old/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c 2009-10-27 11:46:07 +0000
402+++ new/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c 2010-08-20 16:21:01 +0000
403@@ -1,4 +1,5 @@
404 /* { dg-require-effective-target vect_int } */
405+/* { dg-add-options quad_vectors } */
406
407 #include <stdarg.h>
408 #include "tree-vect.h"
409@@ -85,11 +86,11 @@
410 return 0;
411 }
412
413-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail {! vect_hw_misalign} } } } */
414-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
415-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {! vect_hw_misalign} } } } */
416-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
417+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail {! vect_element_align} } } } */
418+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || vect_element_align } } } } */
419+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {! vect_element_align} } } } */
420+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || vect_element_align } } } } */
421 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { xfail *-*-* } } } */
422-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || vect_hw_misalign } } } } */
423+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || vect_element_align } } } } */
424 /* { dg-final { cleanup-tree-dump "vect" } } */
425
426
427=== modified file 'gcc/testsuite/gcc.dg/vect/vect-outer-5.c'
428--- old/gcc/testsuite/gcc.dg/vect/vect-outer-5.c 2009-05-08 12:39:01 +0000
429+++ new/gcc/testsuite/gcc.dg/vect/vect-outer-5.c 2010-08-20 16:21:01 +0000
430@@ -1,4 +1,5 @@
431 /* { dg-require-effective-target vect_float } */
432+/* { dg-add-options quad_vectors } */
433
434 #include <stdio.h>
435 #include <stdarg.h>
436
437=== modified file 'gcc/testsuite/lib/target-supports.exp'
438--- old/gcc/testsuite/lib/target-supports.exp 2010-08-10 13:31:21 +0000
439+++ new/gcc/testsuite/lib/target-supports.exp 2010-08-20 16:21:01 +0000
440@@ -1642,6 +1642,18 @@
441 }]
442 }
443
444+# Return 1 if this is an ARM target that only supports aligned vector accesses
445+proc check_effective_target_arm_vect_no_misalign { } {
446+ return [check_no_compiler_messages arm_vect_no_misalign assembly {
447+ #if !defined(__arm__) \
448+ || (defined(__ARMEL__) \
449+ && (!defined(__thumb__) || defined(__thumb2__)))
450+ #error FOO
451+ #endif
452+ }]
453+}
454+
455+
456 # Return 1 if this is an ARM target supporting -mfpu=vfp
457 # -mfloat-abi=softfp. Some multilibs may be incompatible with these
458 # options.
459@@ -2547,7 +2559,7 @@
460 if { [istarget mipsisa64*-*-*]
461 || [istarget sparc*-*-*]
462 || [istarget ia64-*-*]
463- || [check_effective_target_arm32] } {
464+ || [check_effective_target_arm_vect_no_misalign] } {
465 set et_vect_no_align_saved 1
466 }
467 }
468@@ -2682,6 +2694,25 @@
469 return $et_vector_alignment_reachable_for_64bit_saved
470 }
471
472+# Return 1 if the target only requires element alignment for vector accesses
473+
474+proc check_effective_target_vect_element_align { } {
475+ global et_vect_element_align
476+
477+ if [info exists et_vect_element_align] {
478+ verbose "check_effective_target_vect_element_align: using cached result" 2
479+ } else {
480+ set et_vect_element_align 0
481+ if { [istarget arm*-*-*]
482+ || [check_effective_target_vect_hw_misalign] } {
483+ set et_vect_element_align 1
484+ }
485+ }
486+
487+ verbose "check_effective_target_vect_element_align: returning $et_vect_element_align" 2
488+ return $et_vect_element_align
489+}
490+
491 # Return 1 if the target supports vector conditional operations, 0 otherwise.
492
493 proc check_effective_target_vect_condition { } {
494@@ -3239,6 +3270,16 @@
495 return $flags
496 }
497
498+# Add to FLAGS the flags needed to enable 128-bit vectors.
499+
500+proc add_options_for_quad_vectors { flags } {
501+ if [is-effective-target arm_neon_ok] {
502+ return "$flags -mvectorize-with-neon-quad"
503+ }
504+
505+ return $flags
506+}
507+
508 # Return 1 if the target provides a full C99 runtime.
509
510 proc check_effective_target_c99_runtime { } {
511