[SelectionDAG] Preserve poison in IS_FPCLASS folds (#193246)
Handle poison explicitly in `IS_FPCLASS` so the fold preserves poison
semantics instead of turning the result into `false`.
Prep work to help with https://github.com/llvm/llvm-project/pull/190307
[CIR] Fix __builtin_clz/__builtin_ctz poison_zero to respect target
CIR was hardcoding poisonZero=true for all clz/ctz builtins, ignoring
the target's isCLZForZeroUndef(). This caused incorrect UB on targets
like AArch64 where clz/ctz of zero is well-defined.
Also add support for __builtin_c[lt]zg fallback (2-arg) variants with
compare+select, and add NYI stubs for elementwise variants.
[libcxx][test] Skip cas_non_power_of_2.pass.cpp in Picolibc build (#191415)
Relates to #191388
This test is currently being run and failing to link, however this is
masked by the XFAIL for clang 21. It is also marked unsupported for 22,
for now.
I ran it with 23 and got this linker error:
```
| ld.lld: error: undefined symbol: __atomic_load
<...>
| ld.lld: error: undefined symbol: __atomic_compare_exchange
```
This happens because for 5 and 6 byte variables, we can't simply
generate code for the atomic, so we emit a library call, and the
picolibc build does not provide implementations of these functions.
[11 lines not shown]
[NFC][SPIR-V] Use getScalarOrVectorComponent{Count,Type} instead of raw operand access (#193410)
Replace direct accesses to SPIR-V type instruction operands with the
existing getScalarOrVectorComponentCount() and
getScalarOrVectorComponentType() helpers
[lldb] Add HTTPS tests for SymbolLocatorSymStore (#192274)
Using self-signed certificates is the only way forward for testing
security features on the HTTPS path. As we don't want to allow
any arbitrary certificate, we add a new property that pins a
fingerprint and any self-signed certificate is only accepted if it
matches this fingerprint.
[AArch64][DAG] Copy flags when narrowExtractedVectorBinOp-ing
The `extract (binop B0, B1), N` fold above already copies flags, use the same for
the `extract (binop (concat X1, X2), Y), N` version. In this case it is helping
copy disjoint or flags.
[AArch64] Use add_like for UMLAL / SMLAL
Similar to the others, this allows us to generate UMLAL and SMLAL from add-like
disjoint ors. There are some cases where we lose the disjoint from the or,
those will be fixed separately.
[NVPTX] Add intrinsics for narrow-fp to bf16 conversions (#191376)
Adds the following intrinsics for narrow-fp to bf16 conversions
introduced in PTX 9.2:
-
llvm.nvvm.{e4m3x2/e5m2x2}.to.bf16x2.rn{.relu}{.satfinite}.scale.n2.ue8m0
-
llvm.nvvm.{e2m3x2/e3m2x2}.to.bf16x2.rn{.relu}{.satfinite}.scale.n2.ue8m0
- llvm.nvvm.e2m1x2.to.bf16x2.rn{.relu}{.satfinite}.scale.n2.ue8m0
Tests have been verified through `ptxas-13.2`.
PTX ISA Reference:
https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-cvt
[ADT] Add predicate based match support to StringSwitch (#188046)
This introduces `Predicate` and `IfNotPredicate` case selection to
StringSwitch to allow use cases like
```
StringSwitch<...>(..)
.Case("foo", FooTok)
.Predicate(isAlpha, IdentifierTok)
...
```
This is mostly useful for improving conciseness and clarity when
processing generated strings, diagnostics, and similar.
[LV] NFCI: Create VPExpressions in transformToPartialReductions. (#182863)
With this change, all logic to generate partial reductions and
recognising them as VPExpressions is contained in
`transformToPartialReductions`, without the need for a second transform
pass.
The PR intends to be a non-functional change.
[MLIR][NVVM] Update SM version requirements of Ops (#192257)
This change updates the SM version requirements of Ops with the
`NVVMRequiresSM` trait to include family-specific SM versions wherever
applicable.
[clang][bytecode] Fix DefaultInitExpr base pointer in IndirectFieldDecls (#193149)
We built up an in correct set of init chain links, causing a
`DefaultInitExpr` later to pick the wrong base pointer. Fix this by
adding one link per decl (-1) in the `IndirectFieldDecl`.
[clangd] [Modules] Refactor cache to support duplicated module name (#193413)
Following of https://github.com/llvm/llvm-project/pull/193158
Although https://github.com/llvm/llvm-project/pull/193158 handles
duplicated module name, the cache in ModulesBuilder still uses the old
assumption.
This patch tries to resolve the problem while not affecting original use
cases as much as possible. As the duplicated module name should be rare
in real world case.
AI Assisted
[mlir][spirv][nfc] Clean up FP8 and BF16 SPIR-V type tests (#193196)
Rename the non-emulation check prefixes for clarity, expand FP8/BF16
test coverage in SPIR-V type and TensorArm tests, and simplify a few
type predicates in SPIRVTypes.cpp.
No functional change intended.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[clangd] Add go-to-definition support for fields in offsetof expressions (#192953)
clangd had no handling for OffsetOfExpr in FindTarget.cpp, so
go-to-definition and find-references on field names inside
__builtin_offsetof(Type, field) produced no results.
Fix this by adding VisitOffsetOfExpr to both visitors:
- The TargetFinder visitor in add(const Stmt*) so that allTargetDecls()
resolves the referenced FieldDecl(s).
- The refInStmt visitor so that findExplicitReferences() emits a
ReferenceLoc per field component, enabling find-references and rename to
locate each field at its source position.
Each OffsetOfNode of kind Field is visited; Identifier nodes (unresolved
dependent-type designators) and Base nodes (implicit base-class
indirections) are intentionally skipped.
Repro:
```
[2 lines not shown]
[RISCV][MC] Emit ISA mapping symbols on .option arch/rvc/norvc/pop (#193123)
When .option arch, .option rvc, .option norvc, or .option pop changes
the active ISA, emit a "$x<ISAString>" mapping symbol before the next
instruction so that tools can determine the ISA in effect for each code
region.
Also emit ISA mapping symbols on begin of first instruction to make sure
link with different object still can disassemble correctly.
Based on #67541
---------
Co-authored-by: Joseph.Faulls <Joseph.Faulls at imgtec.com>
[clang][modules] Fix false positive -Wweak-vtables in named modules (#193136)
The -Wweak-vtables warning was incorrectly firing for classes defined in
C++20 module units. This warning does not apply to module units as the
vtable should be owned by the module and emitted only once.
Fixes #193004
Reapply "[JTS][Passes] Enable JTS By Default" (#193409)
Reverts llvm/llvm-project#193399
The last assertion failure seen on the BOLT buildbot should be fixed by
ee06802dc4a85b4a05ae75c1853bca8e58f76f6d.