diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2008-03-03 11:51:36 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2008-03-03 11:51:36 +0000 |
commit | 6a732743bdccfe0eac5e67d90ef5ee5fe70dfe35 (patch) | |
tree | 4e849176d532002d0c8d07318e28dbf4d03df03c /gcc/tree-ssa-loop-ivopts.c | |
parent | 9310e5e3189bad87ed8eb2bc1e53a0a0be0c5524 (diff) | |
download | gcc-6a732743bdccfe0eac5e67d90ef5ee5fe70dfe35.zip gcc-6a732743bdccfe0eac5e67d90ef5ee5fe70dfe35.tar.gz gcc-6a732743bdccfe0eac5e67d90ef5ee5fe70dfe35.tar.bz2 |
tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME defined in a loop at depth 0 is invariant.
* tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
defined in a loop at depth 0 is invariant.
* tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
be called at loop depth 0.
From-SVN: r132835
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 7bcb981..4121d82 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1254,7 +1254,8 @@ find_interesting_uses_cond (struct ivopts_data *data, tree stmt, tree *cond_p) } /* Returns true if expression EXPR is obviously invariant in LOOP, - i.e. if all its operands are defined outside of the LOOP. */ + i.e. if all its operands are defined outside of the LOOP. LOOP + should not be the function body. */ bool expr_invariant_in_loop_p (struct loop *loop, tree expr) @@ -1262,6 +1263,8 @@ expr_invariant_in_loop_p (struct loop *loop, tree expr) basic_block def_bb; unsigned i, len; + gcc_assert (loop_depth (loop) > 0); + if (is_gimple_min_invariant (expr)) return true; |