[llvm] [Sparc] Optimize compare instruction (PR #167140)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 8 07:46:59 PST 2025


https://github.com/s-barannikov commented:

This is something that should be done at SelectionDAG level.
It is much easier to do and doesn't depend on cmp+branch scheduled next to each other, and as such should trigger in more cases.

Before doing that, I'd suggest to first replace Glue operands of comparisons/branches/selects with normal operands and switch from ISD::ADD[CE]/ISD::SUB[CE] to the corresponding ISD::*_CARRY nodes.


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


More information about the llvm-commits mailing list