[llvm] [AArch64] Lower an equality branch against a logical immediate to EOR + CBZ/CBNZ (PR #223123)

Andrew Pinski via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 22:48:55 PDT 2026


pinskia wrote:

Note depening on the micro-arch, eor/cbnz  might be worse than mov/cmp/bne.  Even though eor/cbnz is smaller.
The reason is because the mov might be resolved in the renamer and not need to be issued and the cmp/bne are merged into one macro-op. While eor takes up an issue slot and so does cbnz.  So 2 issue slots vs a possibility of 1.  Note most micro-arch will merge cmp/bne while the mov improvement is only on some.  

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


More information about the llvm-commits mailing list