AMDGPU/GlobalISel: Switch RegBankLegalize lowering to extended LLTs (#208270)
Stop using LLT::scalar for lowering in AMDGPURegBankLegalizeHelper
Affects integer lowering code for RegBankLLTMappingApplyID and
custom cpp for LoweringMethodID.
[X86] vector-compress.ll - test with x86-64 levels not raw AVX levels (#208745)
Prep work for VECREDUCE_ADD lowering support (VECTOR_COMPRESS expansion
creates VECREDUCE_ADD nodes)
Test with/without vbmi2 to show the terrible v32i8/v64i8 compress
codegen on x86-64-v4 targets
[MLIR][Vector] Relax shape_cast unrolling to per-reassociation-group contiguity (#205684)
UnrollShapeCastPattern previously only unrolled a vector.shape_cast when
the target unroll tile was contiguous in the whole result vector
(isContiguous(targetShape, resultShape)). This rejected valid cases such
as:
```mlir
%0 = vector.shape_cast %src : vector<8x32xf8> to vector<8x1x32xf8> // target tile [8, 1, 4]
%1 = vector.shape_cast %src : vector<8x32x32xf8> to vector<256x32xf8> // target tile [16, 4]
```
This PR factors the source and result shapes of a shape_cast into
independent reassociation groups — maximal aligned source/result dim
ranges that hold equal element counts:
```
- 8x32 → 8x1x32 ⇒ groups {8 ↔ 8x1}, {32 ↔ 32}
- 8x32x32 → 256x32 ⇒ groups {8x32 ↔ 256}, {32 ↔ 32}
```
Instead of requiring the target tile to be contiguous in the whole
result vector, it only checks that the tile is contiguous within each
[12 lines not shown]
[DebugMetadata][DwarfDebug][CodeView] Support function-local static variables in lexical block scopes (6/7) (#187927)
RFC
https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subprogram-and-lexical-block-scopes/68544
Similar to imported declarations and types, the patch tracks
function-local static variables (globals in terms of LLVM IR) in
DISubprogram's 'retainedNodes'. DwarfDebug is adjusted in accordance
with the aforementioned metadata change and provided a support of static
locals scoped by a lexical block. CodeViewDebug is modified to collect
global variables from DISubprogram's 'retainedNodes' too.
The patch assumes that DICompileUnit's 'globals' no longer tracks static
locals and DwarfDebug would assert if any locally-scoped variables get
placed there.
This change has already been reviewed in
https://reviews.llvm.org/D144008, but I’m opening a new PR because it
has been a while since it was approved. Additional logic was added to
[6 lines not shown]
[lldb][Windows] Support modules with long paths (#206099)
`PlatformWindows::DoLoadImage` injected a 261-byte buffer for the loaded
module path. Longer paths would be truncated and fail to load. This
patch adds a growing buffer (up to the NT limit) which is used only when
`GetModuleFileNameA` reports truncation, re-querying without taking an
extra reference on the module.
This patch also adds 3 tests for lldb, lldb-driver and the SBAPI. They
are really regression tests which break if long path support regresses.
Requires:
- https://github.com/llvm/llvm-project/pull/206046
- https://github.com/llvm/llvm-project/pull/206060
[AArch64][SVE] Support lowering masked stores of <4 x bf16> and <8 x bf16>
Add support for lowering masked stores of <4 x bf16> and <8 x bf16> when
target features contain "+sve".
Fixes: #201149
AMDGPU/GlobalISel: Handle G_BITCAST for 16 bit extendedLLTs
Handle bitcast between i16 and f16/bf16.
For true16 this was already legal, make it legal in regbanklegalize as well.
For non-true16 custom lower it to G_ANYEXT to i32 and G_TRUNC to dst.
The "i32 G_ANYEXT f16/bf16" and "f16/bf16 G_TRUNC i32" are already legal,
for example these are generated by common CallLowering argument lowering.
AMDGPU/GlobalISel: Switch RegBankLegalize lowering to extended LLTs
Stop using LLT::scalar for lowering in AMDGPURegBankLegalizeHelper
Affects integer lowering code for RegBankLLTMappingApplyID and
custom cpp for LoweringMethodID.
[SPIR-V] Fix crash on switch with odd-width condition type (#208026)
getPreferredSwitchConditionType called getSimpleVT unconditionally,
which asserts on extended EVTs like i31
Return i1 for non-simple types to keep CodeGenPrepare from widening the
condition
[OpenMPOpt] Null generic-mode wrappers for SPMDized kernels
If a kernel gets SPMDized, it doesn't need the wrapper function that is
passed to __kmpc_parallel_60. Keeping the dead wrapper function can lead
to lots of misleading "local memory global used by non-kernel function"
AMDGPU backend warnings.
Let OpenMPOpt null the wrapper argument such that DCE can then remove
the corresponding dead functions.
Claude assisted with this patch.
[X86] EltsFromConsecutiveLoads - handle trunc(wideload()) patterns (#199371)
The existing path emits N x vpinsrb for buildvecs whose elements are
loads at a regular byte stride larger than the element size:
```asm
movzbl 216(%rsp), %eax
vmovd %eax, %xmm0
vpinsrb $1, 224(%rsp), %xmm0, %xmm0
vpinsrb $2, 232(%rsp), %xmm0, %xmm0
...
vpinsrb $15, 336(%rsp), %xmm0, %xmm0
```
This patch adds a strided-load path to EltsFromConsecutiveLoads that
folds these into wide load(s) + vector truncation:
```asm
vmovdqu64 216(%rsp), %zmm0
[29 lines not shown]
[mlir][vector] Fix crash on untraceable masks in getCompressedMaskOp (#207299)
The loop tracing a mask back to its creation op assumed the chain always
ends at a create_mask/constant_mask/arith.constant, a block-argument
mask made it fall through to isa<> on a null op (segfault), and any
other unhandled defining op spun it forever.
Fixes #206928
Claude Fable 5 did assist with this.
[mlir][vector] add consistent stride verification to masked load/store and gather/scatter ops (#205869)
Extend negative stride checks to MaskedLoadOp, MaskedStoreOp, GatherOp,
and ScatterOp to match LoadOp and StoreOp behavior.
Depends on: https://github.com/llvm/llvm-project/pull/204611.
AI Disclaimer: I used AI for the tests.
@banach-space @dcaballe If you look at the latest commit, you can see
why the integration tests were failing in #204842. Those two calls were
added in this PR, I sincerely apologize to you!
---------
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
[AArch64][SVE] Support lowering masked stores of <4 x bf16> and <8 x bf16>
Add support for lowering masked stores of <4 x bf16> and <8 x bf16> when
target features contain "+sve".
Fixes: #201149
[clangd][remote] Add clangd-index-server support for cross platform indexes (#207202)
The main use case is to serve windows index on linux server.
Without this change server wasn't able to check if project_root path is
absolute and was closed with error: "Index root should be an absolute
path."
This change is meant to solve issue:
https://github.com/clangd/clangd/issues/2646
[lldb][test] Expand blocks test (#208406)
This moves some of the tested logic from the `types/` test that is about
to be deleted to the already existing c/blocks test.
See also #208402
assisted-by: claude
[lldb][test] Add a new test for char types (#208442)
This is a new modern test for char types that replaces the test logic
from `API/types` test that is about to be deleted.
See also #208402
assisted-by: claude
[lldb][test] Add a new test for recursive types (#208449)
This is a new modern test for recursive types that self-reference
themselves via function pointers.
This replaces the test logic from `API/types` test that is about to be
deleted.
See also #208402
assisted-by: claude
[lldb][test] Add a new test for long types (#208447)
This is a new modern test for long types that replaces the test logic
from `API/types` test that is about to be deleted. This is a distinct
test from the normal integer types due to long depending on data models
which change depending on platform.
See also #208402
assisted-by: claude
[lldb][test] Modernize and expand C union test (#208662)
Replace most of the test's setup code with modern test utils and expand
the test case to cover more common or potentially problematic uses of
unions.