diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-02-14 19:07:38 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-02-14 19:07:38 +0000 |
commit | 928bc34f5f3653e17357351b394894827aeef424 (patch) | |
tree | 179f616f6f526bdb6070315bbfbf22e717f577d5 /gcc/gimplify.c | |
parent | 4bcf935d1195ea17f17d5249ef2a502ead734535 (diff) | |
download | gcc-928bc34f5f3653e17357351b394894827aeef424.zip gcc-928bc34f5f3653e17357351b394894827aeef424.tar.gz gcc-928bc34f5f3653e17357351b394894827aeef424.tar.bz2 |
re PR middle-end/35136 (ICE caused by address calculation with loop variable when optimization is on)
PR middle-end/35136
* gimplify.c (force_gimple_operand_bsi): Revert 2008-02-12 change.
(force_gimple_operand): Likewise.
* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): Add new cases
for TARGET_MEM_REF and CONVERT_EXPR/NON_LVALUE_EXPR/NOP_EXPR.
Also recurse on the operand for regular VIEW_CONVERT_EXPRs.
(find_interesting_uses_address): Check addressability and alignment
of the base expression only after substituting bases of IVs into it.
From-SVN: r132320
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index bc576a0..04ed39c 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6629,14 +6629,6 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var) pop_gimplify_context (NULL); - if (*stmts && gimple_in_ssa_p (cfun)) - { - tree_stmt_iterator tsi; - - for (tsi = tsi_start (*stmts); !tsi_end_p (tsi); tsi_next (&tsi)) - mark_symbols_for_renaming (tsi_stmt (tsi)); - } - return expr; } @@ -6656,6 +6648,14 @@ force_gimple_operand_bsi (block_stmt_iterator *bsi, tree expr, expr = force_gimple_operand (expr, &stmts, simple_p, var); if (stmts) { + if (gimple_in_ssa_p (cfun)) + { + tree_stmt_iterator tsi; + + for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi)) + mark_symbols_for_renaming (tsi_stmt (tsi)); + } + if (before) bsi_insert_before (bsi, stmts, m); else |