mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8218721: C1's CEE optimization produces safepoint poll with invalid debug information
Bail out of CEE if one of the gotos is a safepoint but the if is not. Reviewed-by: vlivanov, mdoerr
This commit is contained in:
parent
493a77061f
commit
799c9a66fd
3 changed files with 224 additions and 1 deletions
|
@ -174,6 +174,12 @@ void CE_Eliminator::block_do(BlockBegin* block) {
|
|||
for_each_phi_fun(t_block, phi, return; );
|
||||
for_each_phi_fun(f_block, phi, return; );
|
||||
|
||||
// Only replace safepoint gotos if state_before information is available (if is a safepoint)
|
||||
bool is_safepoint = if_->is_safepoint();
|
||||
if (!is_safepoint && (t_goto->is_safepoint() || f_goto->is_safepoint())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 2) substitute conditional expression
|
||||
// with an IfOp followed by a Goto
|
||||
// cut if_ away and get node before
|
||||
|
@ -202,7 +208,7 @@ void CE_Eliminator::block_do(BlockBegin* block) {
|
|||
|
||||
// append Goto to successor
|
||||
ValueStack* state_before = if_->state_before();
|
||||
Goto* goto_ = new Goto(sux, state_before, if_->is_safepoint() || t_goto->is_safepoint() || f_goto->is_safepoint());
|
||||
Goto* goto_ = new Goto(sux, state_before, is_safepoint);
|
||||
|
||||
// prepare state for Goto
|
||||
ValueStack* goto_state = if_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue