aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-04-30 11:53:31 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-04-30 11:53:31 +0000
commitcebe850dfa7ab54ce56340f21c06a73547273870 (patch)
tree7208b6300d240abf6ffcf5fd64fa81912a7933df
parente1c444fef05475d8f7b4fa2f746ad49ba78b0b69 (diff)
downloadgcc-cebe850dfa7ab54ce56340f21c06a73547273870.zip
gcc-cebe850dfa7ab54ce56340f21c06a73547273870.tar.gz
gcc-cebe850dfa7ab54ce56340f21c06a73547273870.tar.bz2
genrecog.c (simplify_tests): Check that CONST_INT and XWINT tests are for the same position.
gcc/ * genrecog.c (simplify_tests): Check that CONST_INT and XWINT tests are for the same position. From-SVN: r222618
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/genrecog.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 854ae41..8b18882 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * genrecog.c (simplify_tests): Check that CONST_INT and XWINT tests
+ are for the same position.
+
2015-04-29 Aditya Kumar <hiraditya@hotmail.com>
* tree-vectorizer.c (set_uid_loop_bbs): New. Factored out of
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index e152b34..cc3ff07 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -1597,7 +1597,8 @@ simplify_tests (state *s)
&& d->if_statement_p (&label)
&& label == CONST_INT)
if (decision *second = d->first->to->singleton ())
- if (second->test.kind == test::WIDE_INT_FIELD
+ if (d->test.pos == second->test.pos
+ && second->test.kind == test::WIDE_INT_FIELD
&& second->test.u.opno == 0
&& second->if_statement_p (&label)
&& IN_RANGE (int64_t (label),