Skip to content

Commit a98b9e7

Browse files
8362832: compiler/macronodes/TestTopInMacroElimination.java hits assert(false) failed: unexpected node
Reviewed-by: dlunden, epeter, kvn
1 parent 19cca0a commit a98b9e7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/hotspot/share/opto/macro.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,11 @@ Node *PhaseMacroExpand::value_from_mem(Node *sfpt_mem, Node *sfpt_ctl, BasicType
501501
}
502502
} else if (mem->is_ArrayCopy()) {
503503
done = true;
504+
} else if (mem->is_top()) {
505+
// The slice is on a dead path. Returning nullptr would lead to elimination
506+
// bailout, but we want to prevent that. Just forwarding the top is also legal,
507+
// and IGVN can just clean things up, and remove whatever receives top.
508+
return mem;
504509
} else {
505510
DEBUG_ONLY( mem->dump(); )
506511
assert(false, "unexpected node");

test/hotspot/jtreg/ProblemList-jvmti-stress-agent.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
#
2828
#############################################################################
2929

30-
31-
compiler/macronodes/TestTopInMacroElimination.java 8362832 generic-all
32-
3330
gc/stringdedup/TestStringDeduplicationAgeThreshold.java 8362562 generic-all
3431
gc/stringdedup/TestStringDeduplicationInterned.java 8362562 generic-all
3532
gc/stringdedup/TestStringDeduplicationPrintOptions.java 8362562 generic-all

test/hotspot/jtreg/compiler/macronodes/TestTopInMacroElimination.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/*
2525
* @test
26-
* @bug 8325030
26+
* @bug 8325030 8362832
2727
* @summary Regression test for an assert triggered during allocation elimination because top is found during
2828
* constructing new phis.
2929
* @run main/othervm -XX:-ProfileExceptionHandlers compiler.macronodes.TestTopInMacroElimination

0 commit comments

Comments
 (0)