[llvm] [DAG] combineVSelectWithAllOnesOrZeros - missing freeze (PR #150388)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 03:18:44 PDT 2025


woruyu wrote:

### Test Case Classification (TD Format)

#### 1. Register Allocation Changes (register order differences)
These test cases show differences due to variations in register allocation order. These are not functional regressions.

- `CodeGen/AArch64/vselect-ext.ll`
- `CodeGen/X86/avg-mask.ll`
- `llvm/test/CodeGen/X86/vector-bo-select.ll`
- `llvm/test/CodeGen/X86/ushl_sat_vec.ll`
- `llvm/test/CodeGen/X86/sqrt-fastmath.ll`

#### 2. Freeze Prevents Load+Zext Folding, Causing Extra `vmovq`
The inserted `freeze` interferes with load folding, preventing `load + zero_extend` from being optimized into a single `load zext from`. This results in an extra `vmovq` instruction.

- `llvm/test/CodeGen/X86/avx512-ext.ll`

#### 3. Real Performance Regressions (redundant instructions emitted)
These cases show actual regressions in generated code, with significantly more redundant instructions emitted, potentially impacting performance.

- `llvm/test/CodeGen/X86/var-permute-128.ll`
- `llvm/test/CodeGen/X86/var-permute-256.ll`


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


More information about the llvm-commits mailing list