summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-11 14:19:44 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-11 14:19:44 +0000
commitdb16e52d811403e53a45a73147c192526868cedf (patch)
treeeaa4c4e4f6ea27fc6fee597fa095e7e690f9e904
parentaeb271cd26898b29b688e365f181a38f590f5498 (diff)
downloadgcc-db16e52d811403e53a45a73147c192526868cedf.tar.gz
PR target/47665
* combine.c (make_compound_operation): Only change shifts into multiplication for SCALAR_INT_MODE_P. * gcc.target/i386/pr47665.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170050 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr47684.c20
-rw-r--r--gcc/tree-predcom.c4
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9e8c392b340..e4ca2b6803c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/47665
+ * combine.c (make_compound_operation): Only change shifts into
+ multiplication for SCALAR_INT_MODE_P.
+
2011-02-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR testsuite/47400
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c5bf3eb787d..10e3be701c9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/47665
+ * gcc.target/i386/pr47665.c: New test.
+
2011-02-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/47629
diff --git a/gcc/testsuite/gcc.dg/pr47684.c b/gcc/testsuite/gcc.dg/pr47684.c
new file mode 100644
index 00000000000..475aa1549b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr47684.c
@@ -0,0 +1,20 @@
+/* PR debug/47684 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcompare-debug" } */
+
+int in[8][4];
+int out[4];
+
+void
+foo (void)
+{
+ int sum = 1;
+ int i, j, k;
+ for (k = 0; k < 4; k++)
+ {
+ for (j = 0; j < 4; j++)
+ for (i = 0; i < 4; i++)
+ sum *= in[i + k][j];
+ out[k] = sum;
+ }
+}
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index f744d448780..2dbd07d135a 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1,5 +1,5 @@
/* Predictive commoning.
- Copyright (C) 2005, 2007, 2008, 2009, 2010
+ Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
@@ -1668,6 +1668,8 @@ single_nonlooparound_use (tree name)
return NULL;
}
+ else if (is_gimple_debug (stmt))
+ continue;
else if (ret != NULL)
return NULL;
else