aboutsummaryrefslogtreecommitdiff
path: root/gcc/lambda-code.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2010-03-16 11:33:45 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2010-03-16 11:33:45 +0000
commit7a1817642b2da6c3163533bf367bf6ba1a878f52 (patch)
treeb62a2f40c7d39797a2ba9915118b892b93c7ed00 /gcc/lambda-code.c
parent457eeaae81fd615a739dac6844835dee7c9b641c (diff)
downloadgcc-7a1817642b2da6c3163533bf367bf6ba1a878f52.zip
gcc-7a1817642b2da6c3163533bf367bf6ba1a878f52.tar.gz
gcc-7a1817642b2da6c3163533bf367bf6ba1a878f52.tar.bz2
re PR tree-optimization/42917 ("-fcompare-debug failure" with -ftree-loop-linear)
PR tree-optimization/42917 * lambda-code.c (remove_iv): Skip debug statements. (lambda_loopnest_to_gcc_loopnest): Likewise. (not_interesting_stmt): Debug statements are not interesting. Co-Authored-By: Alexandre Oliva <aoliva@redhat.com> From-SVN: r157477
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r--gcc/lambda-code.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index e5fe629..50f7d47 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -1657,7 +1657,7 @@ remove_iv (gimple iv_stmt)
continue;
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, arg)
- if (stmt != iv_stmt)
+ if (stmt != iv_stmt && !is_gimple_debug (stmt))
used = true;
if (!used)
@@ -1839,6 +1839,9 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest,
gimple_seq stmts;
lambda_body_vector lbv, newlbv;
+ if (is_gimple_debug (stmt))
+ continue;
+
/* Compute the new expression for the induction
variable. */
depth = VEC_length (tree, new_ivs);
@@ -1885,7 +1888,8 @@ not_interesting_stmt (gimple stmt)
loop, we would have already failed the number of exits tests. */
if (gimple_code (stmt) == GIMPLE_LABEL
|| gimple_code (stmt) == GIMPLE_GOTO
- || gimple_code (stmt) == GIMPLE_COND)
+ || gimple_code (stmt) == GIMPLE_COND
+ || is_gimple_debug (stmt))
return true;
return false;
}