On 6/24/2026 4:28 AM, Eldar Osmanovic wrote:
From: Andrew Bennett <[email protected]>
GCC can modify a rtx which was created using stack_pointer_rtx.
This means that just doing a straight address comparision of a rtx
against stack_pointer_rtx to see whether it is the stack pointer
register will not be correct in all cases.
gcc/
* config/mips/mips.cc: Rewrite comparisons of a rtx against
stack_pointer_rtx to check that firstly the rtx is a register
and its register number is STACK_POINTER_REGNUM.
* config/mips/mips.md: Likewise.
stack_pointer_rtx is unique and shouldn't be changing. It should always
be safe to do a pointer comparison against stack_pointer_rtx. I suspect
you need to dig deeper to find the root cause here.
Jeff