LLVM/project cd1baf3libc/test/src/__support/wctype CMakeLists.txt

[libc][NFC][wctype] Fix test ci for old drivers (#199307)
DeltaFile
+17-2libc/test/src/__support/wctype/CMakeLists.txt
+17-21 files

LLVM/project d22dfb7llvm/docs LangRef.rst

mention pointer comparisons created by passes

Created using spr 1.3.6-beta.1
DeltaFile
+9-6llvm/docs/LangRef.rst
+9-61 files

LLVM/project 0bc7fb9libc/test/src/__support/wctype CMakeLists.txt

[libc][NFC][wctype] Fix test ci for old drivers
DeltaFile
+8-2libc/test/src/__support/wctype/CMakeLists.txt
+8-21 files

LLVM/project f76446bllvm/test/CodeGen/X86 ctselect.ll ctselect-vector.ll

[X86] Stop claiming f128 CT_SELECT Custom; regen ctselect tests

X86's LowerCT_SELECT falls through to X86ISD::CT_SELECT for any FP
type it claims Custom but doesn't special-case (only f80 has the
three-i32-chunk path, and scalar f32/f64 the SSE register path).
For f128 the fall-through produces an X86ISD::CT_SELECT with f128
result type, for which no isel pattern exists, and selection
ICEs with "Cannot select".

Drop f128 from the CT_SELECT Custom loop so the generic legalizer's
memory-blend path (recently added in the core PR) handles it.

Regenerate CHECK lines for all X86 ctselect tests to reflect the
expanded coverage (half/bfloat/fp80/fp128) introduced upstream.
DeltaFile
+1,107-1,533llvm/test/CodeGen/X86/ctselect.ll
+125-534llvm/test/CodeGen/X86/ctselect-vector.ll
+184-187llvm/test/CodeGen/X86/ctselect-i386-mmx.ll
+26-208llvm/test/CodeGen/X86/ctselect-i386-fp.ll
+8-63llvm/test/CodeGen/X86/ctselect-i386.ll
+3-24llvm/test/CodeGen/X86/ctselect-edge-cases.ll
+1,453-2,5491 files not shown
+1,459-2,5507 files

LLVM/project 88fff4bllvm/lib/Target/X86 X86ISelLowering.cpp

[X86] Restore combineSelect BLENDV sign-bit fold

The optimization that folds X86ISD::BLENDV away when the condition's
sign bit is statically known was inadvertently dropped during a prior
rebase conflict resolution. Its absence caused unrelated CHECK lines
in combine-sdiv.ll, vector-compress.ll, vector-idiv-{u,s}div-*.ll to
fail because main expects the post-optimization codegen.

Restores the block at llvm/lib/Target/X86/X86ISelLowering.cpp line
~49587 (after combineLogicBlendIntoConditionalNegate, before the
VSELECT/BLENDV shuffle handling), matching origin/main verbatim.
DeltaFile
+15-3llvm/lib/Target/X86/X86ISelLowering.cpp
+15-31 files

LLVM/project e785e33llvm/lib/Target/X86 X86InstrInfo.cpp X86ISelLowering.cpp, llvm/test/CodeGen/X86 ctselect-vector.ll ctselect-i386-mmx.ll

[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.
DeltaFile
+463-452llvm/lib/Target/X86/X86InstrInfo.cpp
+211-492llvm/test/CodeGen/X86/ctselect-vector.ll
+188-255llvm/test/CodeGen/X86/ctselect-i386-mmx.ll
+126-146llvm/test/CodeGen/X86/ctselect-i386-fp.ll
+69-6llvm/lib/Target/X86/X86ISelLowering.cpp
+3-6llvm/lib/Target/X86/X86InstrInfo.h
+1,060-1,3572 files not shown
+1,061-1,3608 files

LLVM/project e0c4d09clang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files

LLVM/project 700d215llvm/lib/Target/X86 X86ISelLowering.cpp X86InstrInfo.cpp, llvm/test/CodeGen/X86 ctselect-vector.ll ctselect-i386-fp.ll

[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.
DeltaFile
+1,274-0llvm/test/CodeGen/X86/ctselect-vector.ll
+763-35llvm/lib/Target/X86/X86ISelLowering.cpp
+722-0llvm/test/CodeGen/X86/ctselect-i386-fp.ll
+604-5llvm/lib/Target/X86/X86InstrInfo.cpp
+428-0llvm/test/CodeGen/X86/ctselect-i386-mmx.ll
+409-0llvm/test/CodeGen/X86/ctselect-edge-cases.ll
+4,200-4010 files not shown
+5,085-4516 files

LLVM/project 2fa5182llvm/test/CodeGen/ARM ctselect-vector.ll ctselect-half.ll

[ARM] Regen ctselect tests for new core legalization

The core PR moved CT_SELECT lowering into the generic legalizer
(memory-blend for FP types without a legal same-size integer,
scalar-mask+splat for vectors). ARM tests' CHECK lines need to
reflect the new codegen.

No functional change in ARM target lowering itself; only test
expectations updated to match generated output.
DeltaFile
+972-1,333llvm/test/CodeGen/ARM/ctselect-vector.ll
+513-627llvm/test/CodeGen/ARM/ctselect-half.ll
+51-182llvm/test/CodeGen/ARM/ctselect.ll
+1,536-2,1423 files

LLVM/project d8bee53llvm/lib/Target/ARM ARMISelLowering.cpp ARMTargetMachine.cpp

[ARM] Restore STRICT FP setup, byval pre-load fix, bundle predicate

A prior rebase conflict resolution accidentally dropped several
unrelated pieces of upstream ARM code:

- ARMISelLowering: STRICT_FP_ROUND/FMINNUM/FMAXNUM/FP_EXTEND
  setOperationAction calls (from d08b0f7240aa "Disable strict node
  mutation"), the STRICT_FP_TO_SINT/UINT i32 unconditional setup,
  the STRICT_FP16_TO_FP Expand fallback (reverted from LibCall), the
  byval pre-load fix in LowerCall (from a01a921004c1), and the
  IsStrictFPEnabled=true line at the end of the constructor.
- ARMTargetMachine: broadened createUnpackMachineBundlesLegacy from
  the Thumb2/KCFI predicate to nullptr (unconditional).

These deletions caused CHECK-line mismatches in fp16-fullfp16.ll,
fp-intrinsics-vector.ll, and byval_struct_copy_tailcall.ll. None of
the affected tests use llvm.ct.select.

Restores the upstream code verbatim; ct.select work is unaffected.
DeltaFile
+68-15llvm/lib/Target/ARM/ARMISelLowering.cpp
+5-3llvm/lib/Target/ARM/ARMTargetMachine.cpp
+0-1llvm/lib/Target/ARM/ARMISelLowering.h
+73-193 files

LLVM/project dc7ae68llvm/lib/Target/ARM ARMISelLowering.cpp ARMBaseInstrInfo.cpp, llvm/test/CodeGen/ARM ctselect-vector.ll ctselect-half.ll

[LLVM][ARM] Add native ct.select support for ARM32 and Thumb

This patch implements architecture-specific lowering for ct.select on ARM
(both ARM32 and Thumb modes) using conditional move instructions and
bitwise operations for constant-time selection.

Implementation details:
- Uses pseudo-instructions that are expanded Post-RA to bitwise operations
- Post-RA expansion in ARMBaseInstrInfo for BUNDLE pseudo-instructions
- Handles scalar integer types, floating-point, and half-precision types
- Handles vector types with NEON when available
- Support for both ARM and Thumb instruction sets (Thumb1 and Thumb2)
- Special handling for Thumb1 which lacks conditional execution
- Comprehensive test coverage including half-precision and vectors

The implementation includes:
- ISelLowering: Custom lowering to CTSELECT pseudo-instructions
- ISelDAGToDAG: Selection of appropriate pseudo-instructions
- BaseInstrInfo: Post-RA expansion of BUNDLE to bitwise instruction sequences

    [3 lines not shown]
DeltaFile
+1,839-0llvm/test/CodeGen/ARM/ctselect-vector.ll
+867-0llvm/test/CodeGen/ARM/ctselect-half.ll
+549-0llvm/test/CodeGen/ARM/ctselect.ll
+311-62llvm/lib/Target/ARM/ARMISelLowering.cpp
+335-2llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+187-0llvm/lib/Target/ARM/ARMInstrInfo.td
+4,088-644 files not shown
+4,187-6910 files

LLVM/project ac82f34clang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files

LLVM/project 49c5c48llvm/test/CodeGen/WebAssembly ctselect-fallback-vector.ll ctselect-fallback-patterns.ll

[WebAssembly] Regen ctselect tests, drop SIMD <8xi16>/<16xi8> cases

The core PR's new CT_SELECT expansion normalizes scalar mask to the
vector element type. On WebAssembly that fails for i16/i8 element
vectors because those aren't legal scalar register types, triggering
"Unexpected illegal type!" in LegalizeOp.

Drop <8 x i16> and <16 x i8> cases from the SIMD vector test pending
a fix in lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (see TODO at top).
Regen CHECK lines for everything else.
DeltaFile
+117-233llvm/test/CodeGen/WebAssembly/ctselect-fallback-vector.ll
+16-0llvm/test/CodeGen/WebAssembly/ctselect-fallback-patterns.ll
+12-0llvm/test/CodeGen/WebAssembly/ctselect-fallback.ll
+6-2llvm/test/CodeGen/WebAssembly/ctselect-fallback-edge-cases.ll
+151-2354 files

LLVM/project 633cc16llvm/test/CodeGen/WebAssembly ctselect-fallback-vector.ll ctselect-fallback-patterns.ll

[LLVM][WebAssembly] Regenerate ct.select test CHECK lines

Update CHECK lines to match the new constant-time AND/OR/XOR expansion
from the CT_SELECT legalization fix.
DeltaFile
+196-238llvm/test/CodeGen/WebAssembly/ctselect-fallback-vector.ll
+166-256llvm/test/CodeGen/WebAssembly/ctselect-fallback-patterns.ll
+129-201llvm/test/CodeGen/WebAssembly/ctselect-fallback.ll
+127-186llvm/test/CodeGen/WebAssembly/ctselect-fallback-edge-cases.ll
+10-16llvm/test/CodeGen/WebAssembly/ctselect-side-effects.ll
+628-8975 files

LLVM/project 036021ellvm/test/CodeGen/WebAssembly ctselect-fallback-vector.ll ctselect-fallback-patterns.ll

[ConstantTime][WebAssembly] Add comprehensive tests for ct.select
DeltaFile
+714-0llvm/test/CodeGen/WebAssembly/ctselect-fallback-vector.ll
+641-0llvm/test/CodeGen/WebAssembly/ctselect-fallback-patterns.ll
+552-0llvm/test/CodeGen/WebAssembly/ctselect-fallback.ll
+376-0llvm/test/CodeGen/WebAssembly/ctselect-fallback-edge-cases.ll
+226-0llvm/test/CodeGen/WebAssembly/ctselect-side-effects.ll
+2,509-05 files

LLVM/project 27b0dfaclang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files

LLVM/project da43e82llvm/test/CodeGen/RISCV ctselect-side-effects.ll ctselect-fallback-edge-cases.ll

[LLVM][RISCV] Drop -O3/-filetype from ct.select test RUN lines

llc defaults to -O2 and asm; codegen tests should exercise the
default pipeline. CHECK lines are unchanged — -O2 produces identical
asm to -O3 for all five files.
DeltaFile
+2-2llvm/test/CodeGen/RISCV/ctselect-side-effects.ll
+2-2llvm/test/CodeGen/RISCV/ctselect-fallback-edge-cases.ll
+2-2llvm/test/CodeGen/RISCV/ctselect-fallback-patterns.ll
+2-2llvm/test/CodeGen/RISCV/ctselect-fallback.ll
+8-84 files

LLVM/project 62b6872llvm/test/CodeGen/RISCV ctselect-fallback-vector-rvv.ll ctselect-fallback-edge-cases.ll

[RISCV] Regen ctselect tests, replace RVV vector test with placeholder

The core PR's new CT_SELECT legalizer expansion currently fails for
several scalable-vector cases on RISC-V V extension (basic/load/mixed
patterns hit "Unexpected illegal type!" in LegalizeOp).

Replace the RVV scalable test file with a passing placeholder
documenting the issue. Regen CHECK lines for the other ctselect tests
to match the new core codegen.
DeltaFile
+11-569llvm/test/CodeGen/RISCV/ctselect-fallback-vector-rvv.ll
+3-2llvm/test/CodeGen/RISCV/ctselect-fallback-edge-cases.ll
+4-0llvm/test/CodeGen/RISCV/ctselect-fallback-patterns.ll
+18-5713 files

LLVM/project b909a70llvm/test/CodeGen/RISCV ctselect-fallback-vector-rvv.ll ctselect-fallback-edge-cases.ll

[LLVM][RISCV] Regenerate ct.select test CHECK lines

Update CHECK lines to match the new constant-time AND/OR/XOR expansion
from the CT_SELECT legalization fix.
DeltaFile
+116-348llvm/test/CodeGen/RISCV/ctselect-fallback-vector-rvv.ll
+66-78llvm/test/CodeGen/RISCV/ctselect-fallback-edge-cases.ll
+62-77llvm/test/CodeGen/RISCV/ctselect-fallback-patterns.ll
+7-8llvm/test/CodeGen/RISCV/ctselect-side-effects.ll
+251-5114 files

LLVM/project 1d5373dllvm/test/CodeGen/RISCV ctselect-fallback-vector-rvv.ll ctselect-fallback-patterns.ll

[ConstantTime][RISCV] Add comprehensive tests for ct.select

Add comprehensive test suite for RISC-V fallback implementation:
- Edge cases (zero conditions, large integers, sign extension)
- Pattern matching (nested selects, chains)
- Vector support with RVV extensions
- Side effects and memory operations

The basic fallback test is in the core infrastructure PR.
DeltaFile
+804-0llvm/test/CodeGen/RISCV/ctselect-fallback-vector-rvv.ll
+383-0llvm/test/CodeGen/RISCV/ctselect-fallback-patterns.ll
+214-0llvm/test/CodeGen/RISCV/ctselect-fallback-edge-cases.ll
+176-0llvm/test/CodeGen/RISCV/ctselect-side-effects.ll
+1,577-04 files

LLVM/project f2c90cfclang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files

LLVM/project bce0289llvm/test/CodeGen/Mips ctselect-fallback-vector.ll ctselect-fallback-patterns.ll

[MIPS] Regen ctselect tests, drop MSA cases unsupported by new legalizer

The core PR's new CT_SELECT expansion normalizes the scalar mask to the
vector element type. On MIPS that element type is not always a legal
scalar register (i16, i8 on any MIPS; i64/double on mips32), triggering
"Unexpected illegal type!" in LegalizeOp.

Drop <8 x i16>, <16 x i8>, <2 x i64>, <2 x double> from the MSA fallback
vector test pending a fix in lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
(see TODO at top of test). Regen CHECK lines for everything else.
DeltaFile
+87-319llvm/test/CodeGen/Mips/ctselect-fallback-vector.ll
+33-27llvm/test/CodeGen/Mips/ctselect-fallback-patterns.ll
+29-27llvm/test/CodeGen/Mips/ctselect-fallback-edge-cases.ll
+29-24llvm/test/CodeGen/Mips/ctselect-fallback.ll
+178-3974 files

LLVM/project 34d5750llvm/test/CodeGen/Mips ctselect-fallback-vector.ll ctselect-fallback-patterns.ll

[LLVM][MIPS] Regenerate ct.select test CHECK lines

Update CHECK lines to match the new constant-time AND/OR/XOR expansion
from the CT_SELECT legalization fix.
DeltaFile
+262-320llvm/test/CodeGen/Mips/ctselect-fallback-vector.ll
+133-164llvm/test/CodeGen/Mips/ctselect-fallback-patterns.ll
+117-141llvm/test/CodeGen/Mips/ctselect-fallback.ll
+100-123llvm/test/CodeGen/Mips/ctselect-fallback-edge-cases.ll
+11-13llvm/test/CodeGen/Mips/ctselect-side-effects.ll
+623-7615 files

LLVM/project 5302ac2llvm/test/CodeGen/Mips ctselect-fallback-vector.ll ctselect-fallback-patterns.ll

[LLVM][MIPS] Add comprehensive tests for ct.select
DeltaFile
+830-0llvm/test/CodeGen/Mips/ctselect-fallback-vector.ll
+426-0llvm/test/CodeGen/Mips/ctselect-fallback-patterns.ll
+371-0llvm/test/CodeGen/Mips/ctselect-fallback.ll
+244-0llvm/test/CodeGen/Mips/ctselect-fallback-edge-cases.ll
+183-0llvm/test/CodeGen/Mips/ctselect-side-effects.ll
+2,054-05 files

LLVM/project 449d362clang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files

LLVM/project 845e7ecllvm/test/CodeGen/AArch64 ctselect.ll

[AArch64] Regen ctselect.ll for new core legalization
DeltaFile
+9-18llvm/test/CodeGen/AArch64/ctselect.ll
+9-181 files

LLVM/project 056e570llvm/lib/Target/AArch64 AArch64ISelLowering.cpp AArch64InstrInfo.td, llvm/test/CodeGen/AArch64 ctselect.ll

[LLVM][AArch64] Add native ct.select support for ARM64

This patch implements architecture-specific lowering for ct.select on AArch64
using CSEL (conditional select) instructions for constant-time selection.

Implementation details:
- Uses CSEL family of instructions for scalar integer types
- Uses FCSEL for floating-point types (F16, BF16, F32, F64)
- Post-RA MC lowering to convert pseudo-instructions to real CSEL/FCSEL
- Handles vector types appropriately
- Comprehensive test coverage for AArch64

The implementation includes:
- ISelLowering: Custom lowering to CTSELECT pseudo-instructions
- InstrInfo: Pseudo-instruction definitions and patterns
- MCInstLower: Post-RA lowering of pseudo-instructions to actual CSEL/FCSEL
- Proper handling of condition codes for constant-time guarantees
DeltaFile
+139-0llvm/test/CodeGen/AArch64/ctselect.ll
+56-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+40-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+35-4llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+18-0llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
+11-0llvm/lib/Target/AArch64/AArch64ISelLowering.h
+299-46 files

LLVM/project b112217clang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files

LLVM/project ee35042clang/lib/Sema SemaChecking.cpp, clang/test/CodeGen builtin-ct-select.c

[ConstantTime][Clang] Split __builtin_ct_select tests; expand coverage; misc fixes

- Move codegen test to clang/test/CodeGen/, regen with update_cc_test_checks
- Add ext_vector_type, half/bfloat, and array/function-decay coverage
- New clang/test/Sema/builtin-ct-select.c: -verify diagnostic tests for
  too-few/too-many args, non-integer cond, non-scalar/mismatched operands
- Sema: drop else-after-return in arg-count check
DeltaFile
+1,938-0clang/test/CodeGen/builtin-ct-select.c
+25-671clang/test/Sema/builtin-ct-select.c
+5-8clang/lib/Sema/SemaChecking.cpp
+1,968-6793 files

LLVM/project 4a82a13clang/docs LanguageExtensions.rst, clang/include/clang/Basic Builtins.td

[ConstantTime][Clang] Add __builtin_ct_select for constant-time selection
DeltaFile
+683-0clang/test/Sema/builtin-ct-select.c
+373-0clang/test/Sema/builtin-ct-select-edge-cases.c
+64-0clang/lib/Sema/SemaChecking.cpp
+44-0clang/docs/LanguageExtensions.rst
+13-0clang/lib/CodeGen/CGBuiltin.cpp
+8-0clang/include/clang/Basic/Builtins.td
+1,185-06 files