From b6fa1f6c280fbdc41e9c9897071542b24cbb89e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Mon, 30 Jun 2025 15:33:58 +0200 Subject: [PATCH] Fix spill removal in redundant lea peephole --- src/hotspot/cpu/x86/peephole_x86_64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/x86/peephole_x86_64.cpp b/src/hotspot/cpu/x86/peephole_x86_64.cpp index 59188962d0cd1..5fc39e163e126 100644 --- a/src/hotspot/cpu/x86/peephole_x86_64.cpp +++ b/src/hotspot/cpu/x86/peephole_x86_64.cpp @@ -346,7 +346,7 @@ bool Peephole::lea_remove_redundant(Block* block, int block_index, PhaseCFG* cfg for (DUIterator_Fast imax, i = decode->fast_outs(imax); i < imax; i++) { Node* dependant_lea = decode->fast_out(i); if (dependant_lea->is_Mach() && dependant_lea->as_Mach()->ideal_Opcode() == Op_AddP) { - dependant_lea->set_req(AddPNode::Base, decode_address); + dependant_lea->set_req(AddPNode::Base, lea_derived_oop->in(AddPNode::Address)); // This deleted something in the out array, hence adjust i, imax. --i; --imax;