8388443: C2: Assertion in PhaseRegAlloc::reg2offset() is too strict

Reviewed-by: mbaesken, goetz
This commit is contained in:
Richard Reingruber 2026-07-24 14:27:08 +00:00
parent e0f60015f6
commit a4e39d6b17

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -79,7 +79,7 @@ int PhaseRegAlloc::reg2offset( OptoReg::Name reg ) const {
reg < _matcher._in_arg_limit) ||
reg >= OptoReg::add(_matcher._new_SP, C->out_preserve_stack_slots()) ||
// Allow return_addr in the out-preserve area.
reg == _matcher.return_addr(),
reg == _matcher.return_addr() LP64_ONLY(|| OptoReg::add(reg, -1) == _matcher.return_addr()),
"register allocated in a preserve area" );
return reg2offset_unchecked( reg );
}