diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-12 09:15:08 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-12 09:15:08 +0000 |
commit | 5a0d3f9f2a1f7286ee0343a64410df161aee56fe (patch) | |
tree | 9056a4619bab3ad694d7046b82cc4f590bf3bb48 /gcc/tree-vrp.c | |
parent | a1a3143a5316b2df830e8b96bd516c5ca821b2dc (diff) | |
download | gcc-5a0d3f9f2a1f7286ee0343a64410df161aee56fe.tar.gz |
PR middle-end/60482
* tree-vrp.c (register_edge_assert_for_1): Don't add assert
if there are multiple uses, but op doesn't live on E edge.
* tree-cfg.c (assert_unreachable_fallthru_edge_p): Also ignore
clobber stmts before __builtin_unreachable.
* gcc.dg/vect/pr60482.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208506 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 7aa732ddbb9..30602106211 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5423,12 +5423,9 @@ register_edge_assert_for_1 (tree op, enum tree_code code, return false; /* We know that OP will have a zero or nonzero value. If OP is used - more than once go ahead and register an assert for OP. - - The FOUND_IN_SUBGRAPH support is not helpful in this situation as - it will always be set for OP (because OP is used in a COND_EXPR in - the subgraph). */ - if (!has_single_use (op)) + more than once go ahead and register an assert for OP. */ + if (live_on_edge (e, op) + && !has_single_use (op)) { val = build_int_cst (TREE_TYPE (op), 0); register_new_assert_for (op, op, code, val, NULL, e, bsi); |