summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-reassoc.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-13 15:04:38 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-13 15:04:38 +0000
commiteb4bdd4ddcc8a874a33304dcafdc2863dc3a3115 (patch)
tree30be63e8d337dc502ed3074c1eb4ba97d023b876 /gcc/tree-ssa-reassoc.c
parentad4cd2f17be659a4d0f70cb9b2ec6a6ebe0959fc (diff)
downloadgcc-eb4bdd4ddcc8a874a33304dcafdc2863dc3a3115.tar.gz
2010-01-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/42705 * tree-ssa-reassoc.c (build_and_add_sum): Insert stmts after labels. * gcc.c-torture/compile/pr42705.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-reassoc.c')
-rw-r--r--gcc/tree-ssa-reassoc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index f428008a18e..5f7c6b721d8 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -845,7 +845,7 @@ build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
if ((!op1def || gimple_nop_p (op1def))
&& (!op2def || gimple_nop_p (op2def)))
{
- gsi = gsi_start_bb (single_succ (ENTRY_BLOCK_PTR));
+ gsi = gsi_after_labels (single_succ (ENTRY_BLOCK_PTR));
gsi_insert_before (&gsi, sum, GSI_NEW_STMT);
}
else if ((!op1def || gimple_nop_p (op1def))
@@ -854,7 +854,7 @@ build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
{
if (gimple_code (op2def) == GIMPLE_PHI)
{
- gsi = gsi_start_bb (gimple_bb (op2def));
+ gsi = gsi_after_labels (gimple_bb (op2def));
gsi_insert_before (&gsi, sum, GSI_NEW_STMT);
}
else
@@ -879,7 +879,7 @@ build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
{
if (gimple_code (op1def) == GIMPLE_PHI)
{
- gsi = gsi_start_bb (gimple_bb (op1def));
+ gsi = gsi_after_labels (gimple_bb (op1def));
gsi_insert_before (&gsi, sum, GSI_NEW_STMT);
}
else