summaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-16 12:31:51 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-16 12:31:51 +0000
commit8d59920197b021ec821b87fbf6db1f93767a751d (patch)
treeb4ae6616a618305a5afad4b78279d4779209210a /gcc/tree-vrp.c
parent2a239fcc314dcda7c629c0e40be38825f84a64b0 (diff)
downloadgcc-8d59920197b021ec821b87fbf6db1f93767a751d.tar.gz
2008-09-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37508 * tree-vrp.c (simplify_truth_ops_using_ranges): Also allow -1. * gcc.dg/tree-ssa/pr37508.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140387 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 31d7f10aa13..fbcda55fc2a 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6331,7 +6331,8 @@ simplify_truth_ops_using_ranges (gimple_stmt_iterator *gsi, gimple stmt)
/* Exclude anything that should have been already folded. */
gcc_assert (rhs_code == EQ_EXPR || rhs_code == NE_EXPR
|| rhs_code == TRUTH_XOR_EXPR);
- gcc_assert (integer_zerop (op1) || integer_onep (op1));
+ gcc_assert (integer_zerop (op1) || integer_onep (op1)
+ || integer_all_onesp (op1));
/* Limit the number of cases we have to consider. */
if (rhs_code == EQ_EXPR)