llvm-project
26f51162 - [AArch64] Optimize CBZ wzr and friends. (#161508)

Commit
3 days ago
[AArch64] Optimize CBZ wzr and friends. (#161508) In certain situations, especially with zero phi operands propagated after tail duplications, we can end up with CBZ/CBNZ/TBZ/TBNZ with a zero register. It can can be introduced late in the pipeline. This patch adds a basic pass to fold them away to either a direct branch or removing the instruction entirely. It runs quite late n the pipeline, so doesnt fit into any of the existing passes. It only needs to look at the terminators to each BB, so the new pass should have a limited in compile-time impact.
Author
Parents
Loading