diff options
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 40e7051..0696342 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -1436,6 +1436,10 @@ expand_simple_operations (tree expr) return expr; e = GIMPLE_STMT_OPERAND (stmt, 1); + /* Do not expand random invariants. */ + if (TREE_INVARIANT (e) + && !is_gimple_min_invariant (e)) + return expr; if (/* Casts are simple. */ TREE_CODE (e) != NOP_EXPR && TREE_CODE (e) != CONVERT_EXPR |