aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2013-05-03 10:35:04 -0600
committerJeff Law <law@gcc.gnu.org>2013-05-03 10:35:04 -0600
commita4ee7cb9bfdf444a1bd5d6f3931b6bb3d286b805 (patch)
tree7cfbfff1d49a5ddd719a789fcc708a20ad8f75af /gcc/tree-vrp.c
parent47954c4e773ef399e269f0660a74369b3fb95f93 (diff)
downloadgcc-a4ee7cb9bfdf444a1bd5d6f3931b6bb3d286b805.zip
gcc-a4ee7cb9bfdf444a1bd5d6f3931b6bb3d286b805.tar.gz
gcc-a4ee7cb9bfdf444a1bd5d6f3931b6bb3d286b805.tar.bz2
re PR tree-optimization/57411 (ICE: verify_ssa failed: definition in block 4 does not dominate use in block 11 with -fno-tree-dce -ftree-vectorize)
PR tree-optimization/57411 * tree-vrp.c (simplify_cond_using_ranges): Verify the constant operand of the condition will bit into the new type when eliminating a cast feeding a condition. PR tree-optimization/57411 * gcc.c-torture/execute/pr57144.c: New test. From-SVN: r198582
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 6ed353f..b5de683 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -8668,7 +8668,8 @@ simplify_cond_using_ranges (gimple stmt)
if (range_int_cst_p (vr)
&& range_fits_type_p (vr,
TYPE_PRECISION (TREE_TYPE (op0)),
- TYPE_UNSIGNED (TREE_TYPE (op0))))
+ TYPE_UNSIGNED (TREE_TYPE (op0)))
+ && int_fits_type_p (op1, TREE_TYPE (innerop)))
{
tree newconst = fold_convert (TREE_TYPE (innerop), op1);
gimple_cond_set_lhs (stmt, innerop);