summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-08 13:39:33 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-08 13:39:33 +0000
commit44f67683401d7c457b3fd2e145cd0ae6fdb8ca20 (patch)
tree5a809c37df1938d156b3f35a25564342c3c68d22 /gcc
parent41bc572755ec5eb8283063bdbd8fa7a8d81a6497 (diff)
downloadgcc-44f67683401d7c457b3fd2e145cd0ae6fdb8ca20.tar.gz
Don't return identity for CONST or symbolic reference
gcc/ PR rtl-optimization/54157 * combine.c (gen_lowpart_for_combine): Don't return identity for CONST or symbolic reference. gcc/testsuite/ PR rtl-optimization/54157 * gcc.target/i386/pr54157.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190228 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/combine.c7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54157.c21
4 files changed, 33 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5aa6902dbbe..7e94097a10f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-08-08 Richard Sandiford <rdsandiford@googlemail.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/54157
+ * combine.c (gen_lowpart_for_combine): Don't return identity
+ for CONST or symbolic reference.
+
2012-08-08 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* common/config/i386/i386-common.c (OPTION_MASK_ISA_ADX_SET): New.
diff --git a/gcc/combine.c b/gcc/combine.c
index 495e1297e93..2b91eb9ccb3 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10634,13 +10634,6 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x)
if (omode == imode)
return x;
- /* Return identity if this is a CONST or symbolic reference. */
- if (omode == Pmode
- && (GET_CODE (x) == CONST
- || GET_CODE (x) == SYMBOL_REF
- || GET_CODE (x) == LABEL_REF))
- return x;
-
/* We can only support MODE being wider than a word if X is a
constant integer or has a mode the same size. */
if (GET_MODE_SIZE (omode) > UNITS_PER_WORD
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dc3523ade1d..bd2e3f37268 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/54157
+ * gcc.target/i386/pr54157.c: New file.
+
2012-08-08 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* gcc.target/i386/adx-addcarryx32-1.c: New.
diff --git a/gcc/testsuite/gcc.target/i386/pr54157.c b/gcc/testsuite/gcc.target/i386/pr54157.c
new file mode 100644
index 00000000000..b5c4528b80f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54157.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long -ftree-vectorize" } */
+
+struct s2{
+ int n[24 -1][24 -1][24 -1];
+};
+
+struct test2{
+ struct s2 e;
+};
+
+struct test2 tmp2[4];
+
+void main1 ()
+{
+ int i,j;
+
+ for (i = 0; i < 24 -4; i++)
+ for (j = 0; j < 24 -4; j++)
+ tmp2[2].e.n[1][i][j] = 8;
+}