[llvm] SystemZ: Mark unread CC defs dead at build time (PR #226434)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 03:54:31 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-systemz

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

The custom inserters for the subword atomic pseudos and for probed
allocas, plus the inline stack probe emitted by frame lowering, build
instructions whose CC def is never read. Set the dead flags.

Marking the RISBG32 in the subword cmpxchg loop dead lets MachineSink
move it out of the compare block and into the store block, so it is
skipped when the comparison fails.

Co-Authored-By: Claude Opus 5 <noreply@<!-- -->anthropic.com>

---
Full diff: https://github.com/llvm/llvm-project/pull/226434.diff


6 Files Affected:

- (modified) llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp (+6-3) 
- (modified) llvm/lib/Target/SystemZ/SystemZISelLowering.cpp (+53-21) 
- (modified) llvm/test/CodeGen/SystemZ/atomicrmw-fadd-04.ll (+3-3) 
- (modified) llvm/test/CodeGen/SystemZ/cmpxchg-01.ll (+10-10) 
- (modified) llvm/test/CodeGen/SystemZ/cmpxchg-02.ll (+12-12) 
- (added) llvm/test/CodeGen/SystemZ/dead-cc-defs.ll (+75) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/226434


More information about the llvm-commits mailing list