aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2011-03-18 13:22:42 +0000
committerChung-Lin Tang <cltang@codesourcery.com>2011-03-18 13:22:42 +0000
commit1a3f217e61baf2d1aee7b634346f174e9d4f5e9f (patch)
tree18cdba4152f2ab36da07d5c34401ec0c9574f3f2
parent07e7d9b3eab006cbeaff7bebebf126109373745b (diff)
2011-03-18 Chung-Lin Tang <cltang@codesourcery.com>
* combine.c (try_combine): Do simplification only call of subst() on i2 even when i1 is present. Update comments. testsuite/ * gcc.target/arm/unsigned-extend-1.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@171138 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c10
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/arm/unsigned-extend-1.c9
4 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8c4233df2b5..176a13a5399 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-18 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * combine.c (try_combine): Do simplification only call of
+ subst() on i2 even when i1 is present. Update comments.
+
2011-03-18 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_delegitimize_address): Handle UNSPEC_SYMOFF
diff --git a/gcc/combine.c b/gcc/combine.c
index f9d33b3d539..fe3302a492d 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3063,7 +3063,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p)
/* It is possible that the source of I2 or I1 may be performing
an unneeded operation, such as a ZERO_EXTEND of something
that is known to have the high part zero. Handle that case
- by letting subst look at the innermost one of them.
+ by letting subst look at the inner insns.
Another way to do this would be to have a function that tries
to simplify a single insn instead of merging two or more
@@ -3088,11 +3088,9 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p)
subst_low_luid = DF_INSN_LUID (i1);
i1src = subst (i1src, pc_rtx, pc_rtx, 0, 0);
}
- else
- {
- subst_low_luid = DF_INSN_LUID (i2);
- i2src = subst (i2src, pc_rtx, pc_rtx, 0, 0);
- }
+
+ subst_low_luid = DF_INSN_LUID (i2);
+ i2src = subst (i2src, pc_rtx, pc_rtx, 0, 0);
}
n_occurrences = 0; /* `subst' counts here */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 59d736a71f8..5897ac34255 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-18 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * gcc.target/arm/unsigned-extend-1.c: New.
+
2011-03-18 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/48161
diff --git a/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c b/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c
new file mode 100644
index 00000000000..6c55561df95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv6" } */
+
+unsigned char foo (unsigned char c)
+{
+ return (c >= '0') && (c <= '9');
+}
+
+/* { dg-final { scan-assembler-not "uxtb" } } */