[RISCV][GlobalISel]Implement support for vector calling convention with fixed length vectors (#199227)
Implementing IRTranslator support for fixed length vectors when the V
extension is used. This implementation works similar to SelecionDAGs. We
use insert and extract subvector OPs to get the fixed length vectors out
of the scalable length vectors.
[libc][math] Add iscanonical functions to math.yaml
Surface the existing iscanonical, iscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.
To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.
Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
And `-DLIBC_TYPES_HAS_FLOAT16=ON` for iscanonicalf16.
[libc][math] Add iscanonical functions to math.yaml
Surface the existing iscanonical, iscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.
To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.
Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
And `LIBC_TYPES_HAS_FLOAT16=ON` for iscanonicalf16.
[libc][math] Add iscanonical functions to math.yaml
Surface the existing iscanonical, iscanonicalbf16, iscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.
To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.
Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
And `LIBC_TYPES_HAS_FLOAT16=ON` for iscanonicalf16.
[RISCV][TTI] Make getShuffleCost check we have a vector before querying getVectorElementCount (#199286)
Fixes the assert reported here:
<https://github.com/llvm/llvm-project/pull/198446#issuecomment-4522589671>
I believe this happens when the element type isn't a legal RVV element
type and so has been scalarised by type legalisation.
Adding this guard also matches the AArch64 implementation.
The test change is LLM generated.
[Clang][CodeGen] map `noescape` to capture(address) (was capture(none)) (#199281)
`capture(none)` has very restrictive semantics and an easy footgun to
accidentally fire some UB into your code with. Most significantly it
does not allow any visible side-effects of whether a pointer was null or
not to escape the function. This means that the function cannot perform
different side effects depending on whether a pointer marked `noescape`
is null. Relax this to `captures(address)`, which allows information
about the numerical address to escape the function, but no provenance
(i.e. nothing that could be dereferenced) may escape.
As discussed in
https://discourse.llvm.org/t/rfc-updating-the-semantics-of-the-noescape-attribute/90326.
[MLIR][XeGPU]Extend load_matrix/store_matrix to support 1D SLM access (#198652)
This PR extended xegpu.load_matrix and xegpu.store_matrix to support 1D
mem_desc for contiguous SLM access
- Added unit tests for 1D load/store (valid ops and invalid cases)
- Added integration test verifying both 1D (<4096xbf16>) and 2D
(<64x128xbf16>), correctly lower through the full WG→SG→WI→XeVM pipeline
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
[libc][math] Add iscanonical functions to math.yaml
Surface the existing iscanonical, iscanonicalbf16, fiscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.
To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.
Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
[VPlan][test] Fix use-after-free in dumpRecipeInPlan/dumpRecipeUnnamedVPValuesInPlan tests (#199275)
https://github.com/llvm/llvm-project/pull/195891 exposed a
use-after-free in the tests: `BinaryOperator *AI` [*] is deleted prior
to VPlan's destructor, which expects all the operands to still be alive.
This patch fixes the test (suggested by a Florian in
https://github.com/llvm/llvm-project/pull/199252#pullrequestreview-4348337988),
by preemptively detaching AI from the VPlan.
[*] No AI was harmed or used during the creation of this patch.
[lld][LoongArch] Handle DTPREL relocations in debug sections
Teach the LoongArch lld backend to classify R_LARCH_TLS_DTPREL32
and R_LARCH_TLS_DTPREL64 as R_DTPREL.
This allows linker processing of TLS debug info references emitted
into .debug_info via .dtprelword/.dtpreldword. Add 32-bit and 64-bit
tests that assemble objects with DTPREL relocations in debug sections
and verify the linked .debug_info contents.
[Instrumentor] Add Cast instruction instrumentation support
We now allow to have instrumentation opportunities for many instructions
(=opcodes) to bundle common classes together. Users can use filters on
the opcode, type-id, and size to statically select what they are
interested in.
[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.
[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.
[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.