[llvm] Check for all frame instructions in finalize isel. (PR #85945)
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 07:01:49 PDT 2024
JonPsson1 wrote:
> The change itself is fine but your description of the problem sounds like there's an iteration bug where the finalizeisel isn't resuming after a block split in the correct point. Is the SystemZ implementation of EmitInstrWithCustomInserter splitting the block incorrectly, or returning the wrong MBB pointer?
The SystemZ EmitInstrWithCustomInserter is scanning forward in MBB in order to handle multiple selects at a time. It however stops on any instruction that clobbers CC (or another pseudo), which would include the call instruction in this case. The logical fix here might be to also stop an a frame setup instruction, but as the isel finalization continues with the new block where the call is, it will also reach the frame destroy instruction. So I think this looks ok.
https://github.com/llvm/llvm-project/pull/85945
More information about the llvm-commits
mailing list