Skip to content

Commit 4c96224

Browse files
committed
8288467: remove memory_operand assert for spilled instructions
Backport-of: af05139133530871c88991aa0340205cfc44972a
1 parent 201dad4 commit 4c96224

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/hotspot/share/opto/chaitin.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,8 +1705,13 @@ void PhaseChaitin::fixup_spills() {
17051705
// instructions which have "stackSlotX" parameter instead of "memory".
17061706
// For example, "MoveF2I_stack_reg". We always need a memory edge from
17071707
// src to cisc, else we might schedule cisc before src, loading from a
1708-
// spill location before storing the spill.
1709-
assert(cisc->memory_operand() == nullptr, "no memory operand, only stack");
1708+
// spill location before storing the spill. On some platforms, we land
1709+
// in this else case because mach->oper_input_base() > 1, i.e. we have
1710+
// multiple inputs. In some rare cases there are even multiple memory
1711+
// operands, before and after spilling.
1712+
// (e.g. spilling "addFPR24_reg_mem" to "addFPR24_mem_cisc")
1713+
// In either case, there is no space in the inputs for the memory edge
1714+
// so we add an additional precedence / memory edge.
17101715
cisc->add_prec(src);
17111716
}
17121717
block->map_node(cisc, j); // Insert into basic block

0 commit comments

Comments
 (0)