aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-reassoc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-11-18 11:23:21 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-11-18 11:23:21 +0100
commit8ebcad86e6aa747d9ca8a077ab1127a04d0d91d3 (patch)
tree45cbeec18a8644392aadc85ed81c832a661162ee /gcc/tree-ssa-reassoc.c
parent7d4c4fde0e89b87d4b449504e4790e1f49262772 (diff)
downloadgcc-8ebcad86e6aa747d9ca8a077ab1127a04d0d91d3.zip
gcc-8ebcad86e6aa747d9ca8a077ab1127a04d0d91d3.tar.gz
gcc-8ebcad86e6aa747d9ca8a077ab1127a04d0d91d3.tar.bz2
re PR tree-optimization/68157 (internal compiler error: in reassoc_stmt_dominates_stmt_p, at tree-ssa-reassoc.c:1287)
PR tree-optimization/68157 * tree-ssa-reassoc.c (attempt_builtin_powi): Set uid of pow_stmt or mul_stmt from stmt's uid. (reassociate_bb): Set uid of mul_stmt from stmt's uid. * g++.dg/opt/pr68157.C: New test. From-SVN: r230530
Diffstat (limited to 'gcc/tree-ssa-reassoc.c')
-rw-r--r--gcc/tree-ssa-reassoc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 7be934d..dfd0da1 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -4441,6 +4441,7 @@ attempt_builtin_powi (gimple *stmt, vec<operand_entry *> *ops)
power));
gimple_call_set_lhs (pow_stmt, iter_result);
gimple_set_location (pow_stmt, gimple_location (stmt));
+ gimple_set_uid (pow_stmt, gimple_uid (stmt));
gsi_insert_before (&gsi, pow_stmt, GSI_SAME_STMT);
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -4524,6 +4525,7 @@ attempt_builtin_powi (gimple *stmt, vec<operand_entry *> *ops)
mul_stmt = gimple_build_assign (target_ssa, MULT_EXPR,
op1, op2);
gimple_set_location (mul_stmt, gimple_location (stmt));
+ gimple_set_uid (mul_stmt, gimple_uid (stmt));
gsi_insert_before (&gsi, mul_stmt, GSI_SAME_STMT);
rf1->repr = target_ssa;
@@ -4541,6 +4543,7 @@ attempt_builtin_powi (gimple *stmt, vec<operand_entry *> *ops)
power));
gimple_call_set_lhs (pow_stmt, iter_result);
gimple_set_location (pow_stmt, gimple_location (stmt));
+ gimple_set_uid (pow_stmt, gimple_uid (stmt));
gsi_insert_before (&gsi, pow_stmt, GSI_SAME_STMT);
}
@@ -4552,6 +4555,7 @@ attempt_builtin_powi (gimple *stmt, vec<operand_entry *> *ops)
mul_stmt = gimple_build_assign (new_result, MULT_EXPR,
result, iter_result);
gimple_set_location (mul_stmt, gimple_location (stmt));
+ gimple_set_uid (mul_stmt, gimple_uid (stmt));
gsi_insert_before (&gsi, mul_stmt, GSI_SAME_STMT);
gimple_set_visited (mul_stmt, true);
result = new_result;
@@ -4908,6 +4912,7 @@ reassociate_bb (basic_block bb)
mul_stmt = gimple_build_assign (lhs, MULT_EXPR,
powi_result, target_ssa);
gimple_set_location (mul_stmt, gimple_location (stmt));
+ gimple_set_uid (mul_stmt, gimple_uid (stmt));
gsi_insert_after (&gsi, mul_stmt, GSI_NEW_STMT);
}
}