From 76b14c29f81a3c7478a305831d2c3eaf530c12f2 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 15 Nov 2010 12:04:46 +0000 Subject: [PATCH] re PR bootstrap/46474 (powerpc64-linux bootstrap comparison failure in libcpp/symtab.o) 2010-11-15 Richard Guenther PR bootstrap/46474 * tree-ssa-math-opts.c (convert_mult_to_fma): Disregard debug stmts. From-SVN: r166750 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-math-opts.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 872ab8bca1b..5387f5b78a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-15 Richard Guenther + + PR bootstrap/46474 + * tree-ssa-math-opts.c (convert_mult_to_fma): Disregard debug stmts. + 2010-11-15 Nick Clifton * config/stormy16/stormy16.c (direct_return): Do not generate a diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index a2dfac6bb48..7837161e440 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -1534,6 +1534,9 @@ convert_mult_to_fma (gimple mul_stmt) use_stmt = USE_STMT (use_p); + if (is_gimple_debug (use_stmt)) + continue; + /* For now restrict this operations to single basic blocks. In theory we would want to support sinking the multiplication in m = a*b; @@ -1603,10 +1606,14 @@ convert_mult_to_fma (gimple mul_stmt) FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, mul_result) { gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt); - enum tree_code use_code = gimple_assign_rhs_code (use_stmt); + enum tree_code use_code; tree addop, mulop1, result = mul_result; bool negate_p = false; + if (is_gimple_debug (use_stmt)) + continue; + + use_code = gimple_assign_rhs_code (use_stmt); if (use_code == NEGATE_EXPR) { result = gimple_assign_lhs (use_stmt); -- 2.30.2