[llvm] [SelectOptimize] Enable in default pipeline for X86 only (PR #200990)

Eitan Frachtenberg via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 6 14:02:46 PDT 2026


eitanf wrote:

@boomanaiden154 

I've updated the PR to address your concerns. In summary, this PR removes a restriction in X86CmovConversion.cpp that was preventing the CMOV conversion pass from running when the SelectOptimize pass was enabled.

Both passes are designed to optimize conditional moves but at different levels:
- SelectOptimize converts selects to conditional jumps when profitable
- X86CmovConversion handles specific CMOV conversion cases

The restriction was causing redundant work and preventing proper optimization cooperation between these passes. Removing it allows both passes to work together effectively without conflicts.

In terms of sufficient motivation, this is a safe change that doesn't introduce any new functionality or behavioral changes, but rather removes an unnecessary restriction.

Impact: This affects workloads using X86 target with optimization enabled (-O1, -O2, -O3) that have conditional move instructions. It's a no-harm improvement that enhances optimization effectiveness without any risk of regressions.

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


More information about the llvm-commits mailing list