8288467: remove memory_operand assert for spilled instructions

Reviewed-by: thartmann, shade, jbhateja
This commit is contained in:
Emanuel Peter 2022-06-21 15:22:02 +00:00
parent b9c396625c
commit af05139133

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