Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit af05139

Browse files
committed
8288467: remove memory_operand assert for spilled instructions
Reviewed-by: thartmann, shade, jbhateja
1 parent b9c3966 commit af05139

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
@@ -1732,8 +1732,13 @@ void PhaseChaitin::fixup_spills() {
17321732
// instructions which have "stackSlotX" parameter instead of "memory".
17331733
// For example, "MoveF2I_stack_reg". We always need a memory edge from
17341734
// src to cisc, else we might schedule cisc before src, loading from a
1735-
// spill location before storing the spill.
1736-
assert(cisc->memory_operand() == nullptr, "no memory operand, only stack");
1735+
// spill location before storing the spill. On some platforms, we land
1736+
// in this else case because mach->oper_input_base() > 1, i.e. we have
1737+
// multiple inputs. In some rare cases there are even multiple memory
1738+
// operands, before and after spilling.
1739+
// (e.g. spilling "addFPR24_reg_mem" to "addFPR24_mem_cisc")
1740+
// In either case, there is no space in the inputs for the memory edge
1741+
// so we add an additional precedence / memory edge.
17371742
cisc->add_prec(src);
17381743
}
17391744
block->map_node(cisc, j); // Insert into basic block

0 commit comments

Comments
 (0)