[clang][NFC] Bump the maximum number of Frontend diagnostics (#210345)
The number of Frontend diagnostics in DiagnosticFrontendKinds.td is
close to the DIAG_SIZE_FRONTEND limit of 200 (195 in use), and in-flight
PRs adding frontend diagnostics (e.g. #187986) run into the static
assert in DiagnosticIDs.cpp. Increase the limit to 300, following the
precedent of #200948 which did the same for Sema diagnostics.
Co-authored-by: Tony Varghese <tony.varghese at ibm.com>
[libc++][cmp][NFC] Fix: Empty namespaces should be avoided (#210624)
Context: Including `<__utility/cmp.h>` causes:
> cmp.h:25:1: error: Empty namespaces should be avoided. Move any checks
around the namespace instead.
[libcpp-avoid-empty-namespaces,-warnings-as-errors]
[clang][NFC] Bump the maximum number of Frontend diagnostics
The number of Frontend diagnostics in DiagnosticFrontendKinds.td is close
to the DIAG_SIZE_FRONTEND limit of 200 (195 in use). Increase the limit
to 300.
[InstCombine] Fix invalid fshl -> lshr fold when shift is vector with constant zero lane (#210606)
For vectors, this is not valid if a subset of the lanes are constant
zero. Doing this fold introduces poison in those lanes. A similar fix
was done for fshr in 46957a138dea339799059ea5bf032e40042ff185 however
the same issue seems to apply to fshl
Fixes https://github.com/llvm/llvm-project/issues/210605
[libcxx][NFC] Address -Wmicrosoft-cast in MSVC's exception_ptr (#210570)
This was introduced as part of #94977. Rather than suppressing the
warning with `#pragma clang diagnostic ignored`, we use
`reinterpret_cast` to avoid the implicit conversion.
[orc-rt] Replace RunWrapperCall with generalized Dispatch (#210591)
RunWrapperCall dispatched wrapper-function calls, but the Session also
needs to dispatch continuations for results returned by the controller.
Replace it with a generalized Dispatch mechanism (DispatchFn) that is
handed an opaque Task for each unit of work, covering both.
QueueingRunner is correspondingly simplified: it no longer knows
anything about wrapper functions and just enqueues the Task it is given.
Tests and the noDispatch helper are updated to the new interface.
[mlir][bufferization] Address review feedback on arith.select dealloc pass
- Use BufferViewFlowOpInterface instead of hardcoded arith::SelectOp check,
so any future op implementing the interface is handled automatically
- Error out (not skip) when no dealloc or cross-block dealloc is found;
the only valid skip is dynamic shapes
- Remove redundant potentialCandidates vector copy in collectCandidates
- Replace erasedDeallocs with deallocsToErase set in rewriteAllocations
- Remove outdated comment about group constraint
- Add error tests for missing-dealloc and cross-block cases
[ConstraintElim] Fix integer overflow when negating constraint (#210627)
Negating a coefficient (e.g. INT64_MIN) can overflow; skip adding the
inverted constraint if it wraps.
Fixes an UBSan failure for the added test.
[ConstantTime] Address reviewer feedback for llvm.ct.select core
Model llvm.ct.select as IntrInaccessibleMemOnly so the call stays pinned
without pessimizing alias analysis. Make CT_SELECT flagless (drop the
getCTSelect flags parameter, dead flag propagation, and
setFlags-after-getNode) and assert its condition is scalar. Blend the FP
memory fallback at the widest legal integer width with ext-load and
trunc-store tails instead of illegal i8 chunks. Restore the LangRef
section dropped in the rebase onto the Markdown docs migration and note
RISC-V Zkt/Zvkt. Apply review style fixes and regenerate affected tests.
[ConstantTime] Fix CT_SELECT expansion to preserve constant-time guarantees
Create CT_SELECT nodes for scalar types regardless of target support, so
they survive DAGCombiner (visitCT_SELECT is conservative). Expand to
AND/OR/XOR during operation legalization after SETCC is lowered, preventing
the sext(setcc)->select fold chain that converts constant-time patterns
into data-dependent conditional moves (e.g. movn/movz on MIPS).
The mask uses SUB(0, AND(Cond, 1)) instead of SIGN_EXTEND because type
legalization already promoted i1 to the SetCC result type, making
SIGN_EXTEND a no-op for same-width types.
[LangRef][ConstantTime] Add documentation for llvm.ct.select.* constant-time intrinsics (#181042)
This PR introduces and documents the llvm.ct.select.* constant-time
intrinsics, providing timing-independent selection operations for
security-sensitive code. The LangRef is updated with syntax, semantics,
supported types, and usage guidance.
Additionally, test coverage is extended with a new <8 x float> variant
(llvm.ct.select.v8f32) and corresponding X86 codegen tests to ensure
correct lowering on both x64 and x32 targets.