On 10/13/22 17:56, Segher Boessenkool wrote: > > h8300 fails during GCC build: > /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': > /home/segher/src/gcc/libgcc/unwind.inc:141:1: error: could not split insn > 141 | } > | ^ > (insn 69 256 327 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [12 S4 A32]) > (reg/f:SI 7 sp)) "/home/segher/src/gcc/libgcc/unwind.inc":118:12 19 {*movsi} > (expr_list:REG_ARGS_SIZE (const_int 4 [0x4]) > (nil))) > during RTL pass: final > which looks like a backend bug, I don't see a pattern that could split > this (without needing an extra clobber)? I'm aware of this -- its invalid RTL: Uses of the register outside of an address are not permitted within the same insn as a use in an embedded side effect expression because such insns behave differently on different machines and hence must be treated as ambiguous and disallowed. I'd actually tried to turn on LRA for the H8 port a little while ago and stumbled over it. I'm aware of a similar situation involving a general register on the H8, but using reload instead of LRA.  I looked at it a while back and my recollection was that the insn was actually fine until reload got its grubby hands on it.  And when I wandered reload to hunt for anything which handled the restriction noted above, I didn't find anything.  If you were to search for H8 bugs in bugzilla, it should be discoverable. While we could potentially work around this in the backend, it'd be a hack at best.  It hasn't risen to the top of my priority list yet.  I considered suggesting we change this from "invalid" to "target defined" behavior, but that felt like a cop-out. jeff