[all-commits] [llvm/llvm-project] cca6da: [LLVM][X86] Add native ct.select support for X86 a...
Julius Alexandre via All-commits
all-commits at lists.llvm.org
Sat Mar 7 13:34:39 PST 2026
Branch: refs/heads/users/wizardengineer/ct-select-x86
Home: https://github.com/llvm/llvm-project
Commit: cca6da444d2edc19dc58cd4376db2c82dce6ccc8
https://github.com/llvm/llvm-project/commit/cca6da444d2edc19dc58cd4376db2c82dce6ccc8
Author: wizardengineer <juliuswoosebert at gmail.com>
Date: 2026-03-07 (Sat, 07 Mar 2026)
Changed paths:
M llvm/lib/Target/X86/X86.td
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Target/X86/X86ISelLowering.h
M llvm/lib/Target/X86/X86InstrCMovSetCC.td
M llvm/lib/Target/X86/X86InstrCompiler.td
M llvm/lib/Target/X86/X86InstrFragments.td
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/lib/Target/X86/X86InstrInfo.h
M llvm/lib/Target/X86/X86InstrPredicates.td
M llvm/lib/Target/X86/X86TargetMachine.cpp
A llvm/test/CodeGen/X86/ctselect-edge-cases.ll
A llvm/test/CodeGen/X86/ctselect-i386-fp.ll
A llvm/test/CodeGen/X86/ctselect-i386-mmx.ll
A llvm/test/CodeGen/X86/ctselect-i386.ll
A llvm/test/CodeGen/X86/ctselect-optimization.ll
A llvm/test/CodeGen/X86/ctselect-vector.ll
M llvm/test/CodeGen/X86/ctselect.ll
A nasty-fix-constant.patch
Log Message:
-----------
[LLVM][X86] Add native ct.select support for X86 and i386
Add native X86 implementation with CMOV instructions and comprehensive tests:
- X86 ISelLowering with CMOV for x86_64 and i386
- Fallback bitwise operations for i386 targets without CMOV
- Post-RA expansion for pseudo-instructions
- Comprehensive test coverage:
- Edge cases (zero conditions, large integers)
- i386-specific tests (FP, MMX, non-CMOV fallback)
- Vector operations
- Optimization patterns
The basic test demonstrating fallback is in the core infrastructure PR.
Commit: 257f7d254671bc21d342c28d4660b6ba7a23ea56
https://github.com/llvm/llvm-project/commit/257f7d254671bc21d342c28d4660b6ba7a23ea56
Author: wizardengineer <juliuswoosebert at gmail.com>
Date: 2026-03-07 (Sat, 07 Mar 2026)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/lib/Target/X86/X86InstrInfo.h
M llvm/test/CodeGen/X86/ctselect-i386-fp.ll
Log Message:
-----------
[LLVM][X86] Add f80 support for ct.select
Add special handling for x86_fp80 types in CTSELECT lowering by splitting
them into three 32-bit chunks, performing constant-time selection on each
chunk, and reassembling the result. This fixes crashes when compiling
tests with f80 types.
Also updated ctselect.ll to match current generic fallback implementation.
Compare: https://github.com/llvm/llvm-project/compare/de75ea63ccc1...257f7d254671
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list