Skip to content

Commit c53e0fe

Browse files
committed
8288467: remove memory_operand assert for spilled instructions
Reviewed-by: stuefe Backport-of: af05139133530871c88991aa0340205cfc44972a
1 parent c6e2a5b commit c53e0fe

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
@@ -1693,8 +1693,13 @@ void PhaseChaitin::fixup_spills() {
16931693
// instructions which have "stackSlotX" parameter instead of "memory".
16941694
// For example, "MoveF2I_stack_reg". We always need a memory edge from
16951695
// src to cisc, else we might schedule cisc before src, loading from a
1696-
// spill location before storing the spill.
1697-
assert(cisc->memory_operand() == NULL, "no memory operand, only stack");
1696+
// spill location before storing the spill. On some platforms, we land
1697+
// in this else case because mach->oper_input_base() > 1, i.e. we have
1698+
// multiple inputs. In some rare cases there are even multiple memory
1699+
// operands, before and after spilling.
1700+
// (e.g. spilling "addFPR24_reg_mem" to "addFPR24_mem_cisc")
1701+
// In either case, there is no space in the inputs for the memory edge
1702+
// so we add an additional precedence / memory edge.
16981703
cisc->add_prec(src);
16991704
}
17001705
block->map_node(cisc, j); // Insert into basic block

0 commit comments

Comments
 (0)