8258790: C2: Crash on empty macro node list
Reviewed-by: kvn, chagedorn
This commit is contained in:
parent
8da7c58016
commit
772addfd24
@ -2563,11 +2563,8 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
|
||||
bool progress = true;
|
||||
while (progress) {
|
||||
progress = false;
|
||||
for (int i = C->macro_count(); i > 0; i--) {
|
||||
if (i > C->macro_count()) {
|
||||
i = C->macro_count(); // more than 1 element can be eliminated at once
|
||||
}
|
||||
Node* n = C->macro_node(i-1);
|
||||
for (int i = C->macro_count(); i > 0; i = MIN2(i - 1, C->macro_count())) { // more than 1 element can be eliminated at once
|
||||
Node* n = C->macro_node(i - 1);
|
||||
bool success = false;
|
||||
DEBUG_ONLY(int old_macro_count = C->macro_count();)
|
||||
if (n->is_AbstractLock()) {
|
||||
@ -2582,11 +2579,8 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
|
||||
progress = true;
|
||||
while (progress) {
|
||||
progress = false;
|
||||
for (int i = C->macro_count(); i > 0; i--) {
|
||||
if (i > C->macro_count()) {
|
||||
i = C->macro_count(); // more than 1 element can be eliminated at once
|
||||
}
|
||||
Node* n = C->macro_node(i-1);
|
||||
for (int i = C->macro_count(); i > 0; i = MIN2(i - 1, C->macro_count())) { // more than 1 element can be eliminated at once
|
||||
Node* n = C->macro_node(i - 1);
|
||||
bool success = false;
|
||||
DEBUG_ONLY(int old_macro_count = C->macro_count();)
|
||||
switch (n->class_id()) {
|
||||
|
Loading…
Reference in New Issue
Block a user