elliottt commented on issue #5430:
Looks like this isn't quite solved yet: the s390x tests that are failing are due to not recording an entry in the
is_movemap of the vcode table for the move that puts the result of theatomic_rmwinstruction into%r2before returning.Attempting a local fix by recording
Operand::fixed_nonallocatableconstraints inis_movewhen appropriate instead of avoiding adding an entry at all hits a bug in regalloc2 where we're assuming that a fixed constraint returned byis_movemust always be a pinned vreg, and not a fixed-nonallocatable register.
elliottt commented on issue #5430:
The last problem here was that moves weren't making it into the final output. The problem was that in the
VCode::emitfunction we were skipping all instructions that satisfiedMachInst::is_move, which includes the moves that we didn't report to regalloc2. The solution was to reuse theVCode::is_movemap rather than callingMachInst::is_move, as presence in that map corresponds directly to whether or not we told regalloc2 about the move.
elliottt commented on issue #5430:
@uweigand I've reworked this a bit more to avoid the changes to VCode. The problem was that there was a move using a fixed non-allocatable register produced by the s390x backend in the
casloop_emitfunction. I've reworked this to useMovPReg, which is designed to handle fixed non-allocatable sources, but this does introduce some additional indirection for the result.
Last updated: Dec 06 2025 at 06:05 UTC