aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-01-18 23:43:54 -0700
committerJeff Law <law@gcc.gnu.org>2016-01-18 23:43:54 -0700
commit2bedb645f2aef48d7cbb70bf5ddb8bf0a4342019 (patch)
tree01f06939e38904f487d71de67d847c5e7cc30273 /gcc/tree-ssanames.c
parent17c15cb932563bb814865c39abc2b952c7707f79 (diff)
downloadgcc-2bedb645f2aef48d7cbb70bf5ddb8bf0a4342019.zip
gcc-2bedb645f2aef48d7cbb70bf5ddb8bf0a4342019.tar.gz
gcc-2bedb645f2aef48d7cbb70bf5ddb8bf0a4342019.tar.bz2
re PR tree-optimization/69320 (wrong code generation at -O2 and higher)
2016-01-18 Jeff Law <law@redhat.com> PR tree-optimization/69320 * tree-ssa-dom.c (record_edge_info): For comparisons against a boolean ranged object, do nothing if the RHS constant is not [0..1]. (optimize_stmt): Comparing a boolean ranged object against a constant outside [0..1] results in a compile-time constant. * tree-ssanames.c (ssa_name_has_boolean_range): Remove unnecessary test. PR tree-optimization/69320 * gcc.c-torture/pr69320-1.c: New test. * gcc.c-torture/pr69320-2.c: New test. * gcc.c-torture/pr69320-3.c: New test. * gcc.c-torture/pr69320-4.c: New test. From-SVN: r232548
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r--gcc/tree-ssanames.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index b6f72e2..ed87f3e 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -437,8 +437,7 @@ ssa_name_has_boolean_range (tree op)
only takes on values [0..1] as determined by VRP
analysis. */
if (INTEGRAL_TYPE_P (TREE_TYPE (op))
- && (TYPE_PRECISION (TREE_TYPE (op)) > 1
- || TYPE_UNSIGNED (TREE_TYPE (op)))
+ && (TYPE_PRECISION (TREE_TYPE (op)) > 1)
&& wi::eq_p (get_nonzero_bits (op), 1))
return true;