aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr67329.c20
4 files changed, 31 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33c91dc..1bac366 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/67329
+ * config/i386/i386.c (iamcu_cost): Set MOVE_RATIO cost to 9.
+
2015-08-24 Renlin Li <renlin.li@arm.com>
* config/arm/arm-protos.h (arm_valid_symbolic_address_p): Declare.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 05fa5e1..070605f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -436,7 +436,7 @@ struct processor_costs iamcu_cost = {
COSTS_N_INSNS (3), /* cost of movsx */
COSTS_N_INSNS (2), /* cost of movzx */
8, /* "large" insn */
- 6, /* MOVE_RATIO */
+ 9, /* MOVE_RATIO */
6, /* cost for loading QImode using movzbl */
{2, 4, 2}, /* cost of loading integer registers
in QImode, HImode and SImode.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 77c8c23..9161ce4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/67329
+ * gcc.target/i386/pr67329.c: New test.
+
2015-08-24 Nathan Sidwell <nathan@acm.org>
* gcc/testsuite/gcc.dg/pr49551.c: Needs -fdata-sections.
diff --git a/gcc/testsuite/gcc.target/i386/pr67329.c b/gcc/testsuite/gcc.target/i386/pr67329.c
new file mode 100644
index 0000000..a29dd5b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr67329.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O3 -fno-tree-fre -fno-tree-pre -fdump-tree-optimized -mtune=iamcu" } */
+
+int
+foo ()
+{
+ const int a[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ int i, sum;
+
+ sum = 0;
+ for (i = 0; i < sizeof (a) / sizeof (*a); i++)
+ sum += a[i];
+
+ return sum;
+}
+
+/* After late unrolling the above loop completely DOM should be
+ able to optimize this to return 28. */
+
+/* { dg-final { scan-tree-dump "return 28;" "optimized" } } */