summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-02-28 23:03:01 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-02-28 23:03:01 +0000
commit85222504cc447607d81183e77a6c450351c20ff7 (patch)
treea47b6dff799264fcfcaf4a9c9332dee53fd5023c /gcc/tree-ssa-dom.c
parentcc284d9cf738f0efd4dedd42476da8372d6a38d6 (diff)
re PR tree-optimization/89536 (wrong code at -Os and above on x86_64-linux-gnu)
PR tree-optimization/89536 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_NOT_EXPR>: Test only whether bit #0 of the value is 0 instead of the entire value. From-SVN: r269289
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 4f4b7db2189..aa4e24bc358 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -348,7 +348,7 @@ edge_info::derive_equivalences (tree name, tree value, int recursion_limit)
&& TREE_CODE (rhs) == SSA_NAME
&& ssa_name_has_boolean_range (rhs))
{
- if (integer_zerop (value))
+ if ((TREE_INT_CST_LOW (value) & 1) == 0)
res = build_one_cst (TREE_TYPE (rhs));
else
res = build_zero_cst (TREE_TYPE (rhs));