diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0149-PR-target-48678.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0149-PR-target-48678.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0149-PR-target-48678.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0149-PR-target-48678.patch new file mode 100644 index 0000000000..da3a872c28 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0149-PR-target-48678.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From ac255441a3e973a974d1ab70d00a9b7269103214 Mon Sep 17 00:00:00 2001 | ||
2 | From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Tue, 19 Apr 2011 16:49:19 +0000 | ||
4 | Subject: [PATCH 149/200] PR target/48678 | ||
5 | * config/i386/i386.md (movstrict<mode>): FAIL if operands[0] | ||
6 | is a SUBREG with non-MODE_INT mode inside of it. | ||
7 | |||
8 | * gcc.target/i386/pr48678.c: New test. | ||
9 | |||
10 | |||
11 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172723 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
12 | |||
13 | index b50a52a..c50002e 100644 | ||
14 | --- a/gcc/config/i386/i386.md | ||
15 | +++ b/gcc/config/i386/i386.md | ||
16 | @@ -2408,6 +2408,9 @@ | ||
17 | { | ||
18 | if (TARGET_PARTIAL_REG_STALL && optimize_function_for_speed_p (cfun)) | ||
19 | FAIL; | ||
20 | + if (GET_CODE (operands[0]) == SUBREG | ||
21 | + && GET_MODE_CLASS (GET_MODE (SUBREG_REG (operands[0]))) != MODE_INT) | ||
22 | + FAIL; | ||
23 | /* Don't generate memory->memory moves, go through a register */ | ||
24 | if (MEM_P (operands[0]) && MEM_P (operands[1])) | ||
25 | operands[1] = force_reg (<MODE>mode, operands[1]); | ||
26 | new file mode 100644 | ||
27 | index 0000000..6f6727f | ||
28 | --- /dev/null | ||
29 | +++ b/gcc/testsuite/gcc.target/i386/pr48678.c | ||
30 | @@ -0,0 +1,16 @@ | ||
31 | +/* PR target/48678 */ | ||
32 | +/* { dg-do compile } */ | ||
33 | +/* { dg-options "-O2 -msse2" } */ | ||
34 | + | ||
35 | +#include <emmintrin.h> | ||
36 | + | ||
37 | +typedef short T __attribute__((may_alias)); | ||
38 | +struct S { __m128i d; }; | ||
39 | + | ||
40 | +__m128i | ||
41 | +foo (short *x, struct S *y, __m128i *z) | ||
42 | +{ | ||
43 | + struct S s = *y; | ||
44 | + ((T *) &s.d)[0] = *x; | ||
45 | + return _mm_cmpeq_epi16 (s.d, *z); | ||
46 | +} | ||
47 | -- | ||
48 | 1.7.0.4 | ||
49 | |||