https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124041
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
(insn 36 34 38 3 (set (reg:SI 21 x21 [orig:109 _26 ] [109])
(reg:SI 31 sp)) "/app/example.cpp":10:16 69 {*movsi_aarch64}
(nil))
```
Was accepted in GCC 15.
But that is invalid according to aarch64_hard_regno_mode_ok:
if (regno == SP_REGNUM)
/* The purpose of comparing with ptr_mode is to support the
global register variable associated with the stack pointer
register via the syntax of asm ("wsp") in ILP32. */
return mode == Pmode || mode == ptr_mode;