LLVM/project 0027f6f.github/workflows libc-shared-tests.yml

[libc][ci] Add libc-shared-test CI for MSVC and QEMU for several archs. (#188553)

Includes:
- MSVC: x86, x64, arm64
- QEMU: aarch64, riscv64
DeltaFile
+92-0.github/workflows/libc-shared-tests.yml
+92-01 files

LLVM/project 3833f03llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.perm.ll

[AMDGPU][GlobalISel] Add RegBankLegalize rules for amdgcn_perm intrinsic (#187798)

Add uniform and divergent register bank legalization rules for the amdgcn_perm intrinsic (v_perm_b32). Since this is a VALU-only instruction, the uniform case maps the destination to UniInVgprB32 and all source operands to VgprB32.
DeltaFile
+4-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+1-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.perm.ll
+5-12 files

LLVM/project 816a820mlir/lib/Dialect/XeGPU/IR XeGPUDialect.cpp, mlir/test/Dialect/XeGPU subgroup-distribute-unit.mlir sg-to-wi-experimental-unit.mlir

[MLIR][XeGPU] Fix a bug in Layout interface: isCompatibleWith() function (#188607)

As title
DeltaFile
+12-3mlir/test/Dialect/XeGPU/subgroup-distribute-unit.mlir
+8-6mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+11-0mlir/test/Dialect/XeGPU/sg-to-wi-experimental-unit.mlir
+31-93 files

LLVM/project 531613emlir/lib/Dialect/MemRef/Transforms ExtractAddressComputations.cpp ElideReinterpretCast.cpp, mlir/lib/Dialect/Tensor/IR TensorOps.cpp

[mlir] Use Repeated<T> in more places to avoid temporary vectors. NFC. (#188846)

Replace `SmallVector<Type/Value>(n, x)` with `Repeated<Type/Value>(n,
x)`. This avoids heap allocations for repeated values.

Also change `ExtractAddressComputations` rebuild callbacks from
`ArrayRef<Value>` to `ValueRange` to enable `Repeated<Value>`
passthrough.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
DeltaFile
+9-8mlir/lib/Dialect/MemRef/Transforms/ExtractAddressComputations.cpp
+3-2mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+2-1mlir/lib/Dialect/MemRef/Transforms/ElideReinterpretCast.cpp
+2-1mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+16-124 files

LLVM/project 2cbbc1aclang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsage.cpp, clang/test/Analysis/Scalable/UnsafeBufferUsage tu-summary-bad-ptr-level.json tu-summary-no-key.json

address comments
DeltaFile
+58-0clang/test/Analysis/Scalable/UnsafeBufferUsage/tu-summary-bad-ptr-level.json
+58-0clang/test/Analysis/Scalable/UnsafeBufferUsage/tu-summary-no-key.json
+53-0clang/test/Analysis/Scalable/UnsafeBufferUsage/tu-summary-bad-element.json
+15-1clang/test/Analysis/Scalable/UnsafeBufferUsage/tu-summary-serialization.test
+5-5clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.cpp
+3-4clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+192-101 files not shown
+194-127 files

LLVM/project 966d969llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.permlane64.ll

[AMDGPU][GlobalISel] Add RegBankLegalize rules for amdgcn_permlane64 (#187840)

Add register bank legalization rules for the amdgcn_permlane64 intrinsic
in the new RegBankLegalize framework.

After GISel legalization, permlane64 always operates on S32 — sub-32-bit
types are anyext'd to S32 and types wider than 32 bits are split into
S32 parts by legalizeLaneOp. Add rules for B32 type.

Also enable -new-reg-bank-select in the permlane64 lit test and update
affected check lines.
DeltaFile
+1-31llvm/test/CodeGen/AMDGPU/llvm.amdgcn.permlane64.ll
+3-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+4-312 files

LLVM/project cdb4578lldb/test/API/lang/objc/objc-class-method TestObjCClassMethod.py

This new flag depends both on the compiler version AND the linker (#188864)

version, and clang will say it supports the flag even if the linker
can't use its output.
The compiler actually has code to know whether the linker version is
right, and sets it to the default if the stars align.

So I'm going to just test whether whatever is the default method for the
compiler and linker works.
DeltaFile
+3-16lldb/test/API/lang/objc/objc-class-method/TestObjCClassMethod.py
+3-161 files

LLVM/project 788ea11lld/MachO ICF.cpp, lld/test/MachO icf-safe-missing-addrsig.s icf-options.s

[lld-macho] Make safe ICF conservative without __llvm_addrsig (#188400)

MachO --icf=safe and --icf=safe_thunks used to keep folding code from
object files that did not contain __llvm_addrsig, which was inconsistent
with the conservative ELF/COFF behavior. Mark all symbols in such
objects as address-significant instead, and add regression coverage for
both safe ICF modes with and without addrsig.
DeltaFile
+112-0lld/test/MachO/icf-safe-missing-addrsig.s
+4-1lld/MachO/ICF.cpp
+1-0lld/test/MachO/icf-options.s
+117-13 files

LLVM/project b9b87ddllvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.struct.buffer.atomic.ll llvm.amdgcn.struct.ptr.buffer.atomic.ll

AMDGPU/GlobalISel: RegBankLegalize rules for buffer atomics (#187550)

Add RegBankLegalize rules for the buffer atomics and/xor/or/inc/dec.
DeltaFile
+10-6llvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.atomic.ll
+10-6llvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.ptr.buffer.atomic.ll
+5-3llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+3-2llvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.ptr.buffer.atomic.ll
+3-2llvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.atomic.ll
+31-195 files

LLVM/project 4562a95llvm/lib/Transforms/Vectorize VPlanUnroll.cpp, llvm/test/Transforms/LoopVectorize tail-folding-optimize-vector-induction-width.ll struct-return-replicate.ll

Revert "[VPlan] Explicitly unroll replicate-regions without live-outs by VF." (#188868)

Reverts llvm/llvm-project#170212

appears to cause a failure with expensive checks:
https://lab.llvm.org/buildbot/#/builders/187/builds/18306
DeltaFile
+0-156llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+98-49llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+80-40llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+41-43llvm/test/Transforms/LoopVectorize/VPlan/vplan-predicate-switch.ll
+18-9llvm/test/Transforms/LoopVectorize/tail-folding-optimize-vector-induction-width.ll
+14-6llvm/test/Transforms/LoopVectorize/struct-return-replicate.ll
+251-30354 files not shown
+531-42060 files

LLVM/project 1b667ebllvm/lib/Target/AArch64 AArch64SystemOperands.td

fixup! More optimisations
DeltaFile
+122-134llvm/lib/Target/AArch64/AArch64SystemOperands.td
+122-1341 files

LLVM/project ba142d8llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/test/MC/AArch64 armv8.7a-xs.s armv9.5a-tlbiw.s

fixup! Move nxs bit into TLBIEntry rather than override
DeltaFile
+57-56llvm/test/MC/AArch64/armv8.7a-xs.s
+21-33llvm/lib/Target/AArch64/AArch64SystemOperands.td
+10-10llvm/test/MC/AArch64/armv9.5a-tlbiw.s
+88-993 files

LLVM/project 2b8c171llvm/lib/Target/AArch64 AArch64SystemOperands.td

fixup! Another tablegen optimisation
DeltaFile
+117-184llvm/lib/Target/AArch64/AArch64SystemOperands.td
+117-1841 files

LLVM/project fe5a21allvm/lib/Target/AArch64 AArch64SystemOperands.td

fixup! More tablegen fixes
DeltaFile
+32-70llvm/lib/Target/AArch64/AArch64SystemOperands.td
+32-701 files

LLVM/project ebb827ellvm/lib/Target/AArch64 AArch64SystemOperands.td

fixup! Refactor TLBI tablegen
DeltaFile
+232-120llvm/lib/Target/AArch64/AArch64SystemOperands.td
+232-1201 files

LLVM/project ab4e564llvm/lib/Target/AArch64 AArch64SystemOperands.td

fixup! Change tablegen as suggested
DeltaFile
+52-30llvm/lib/Target/AArch64/AArch64SystemOperands.td
+52-301 files

LLVM/project d9c15d9llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/test/MC/AArch64 armv9a-tlbip.s

[AArch64][llvm] Separate TLBI-only feature gating from TLBIP aliases

Refactor the TLBI system operand definitions so that TLBI and TLBIP
records are emitted through separate helper multiclasses, whilst keeping
the table layout readable.

The feature-scoped wrappers now apply FeatureTLB_RMI, FeatureRME, and
FeatureTLBIW only to TLBI records (it was previously incorrectly also
applied to TLBIP instructions), while TLBIP aliases remain gated only
by FeatureD128, including their nXS forms.

Update testcases accordingly.
DeltaFile
+92-61llvm/lib/Target/AArch64/AArch64SystemOperands.td
+8-9llvm/test/MC/AArch64/armv9a-tlbip.s
+100-702 files

LLVM/project e251f57llvm/lib/Transforms/Vectorize VPlanUnroll.cpp, llvm/test/Transforms/LoopVectorize tail-folding-optimize-vector-induction-width.ll struct-return-replicate.ll

Revert "[VPlan] Explicitly unroll replicate-regions without live-outs by VF. …"

This reverts commit cb1661b0460627bac4407fda129febefbf3e738a.
DeltaFile
+0-156llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+98-49llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+80-40llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+41-43llvm/test/Transforms/LoopVectorize/VPlan/vplan-predicate-switch.ll
+18-9llvm/test/Transforms/LoopVectorize/tail-folding-optimize-vector-induction-width.ll
+14-6llvm/test/Transforms/LoopVectorize/struct-return-replicate.ll
+251-30354 files not shown
+531-42060 files

LLVM/project 67ea4dellvm/test/CodeGen/AMDGPU fract-match.ll

AMDGPU: Regenerate test checks (#188862)
DeltaFile
+23-2llvm/test/CodeGen/AMDGPU/fract-match.ll
+23-21 files

LLVM/project 781c303llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

fixup! Push these changes further into the backend
DeltaFile
+25-14llvm/lib/Target/AArch64/AArch64SystemOperands.td
+11-6llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+6-9llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+4-4llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+46-334 files

LLVM/project 9151352llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanTransforms.h

Apply code review suggestions
DeltaFile
+5-7llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+3-4llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+9-123 files

LLVM/project 29886a1llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.ds.permute.ll llvm.amdgcn.ds.bpermute.ll

AMDGPU/GlobalISel: RegBankLegalize rules for ds_permute (#188266)
DeltaFile
+29-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.permute.ll
+3-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+1-2llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.ds.permute.mir
+1-2llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.ds.bpermute.mir
+1-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.ll
+1-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.fi.b32.ll
+36-86 files

LLVM/project c739c40llvm/lib/Target/AArch64 AArch64SystemOperands.td

[AArch64][llvm] Rewrite the TLBI multiclass to be much clearer (NFC)

The `tlbi` multiclass is really doing four jobs at once: base TLBI,
synthesized nXS, optional TLBIP, and synthesized TLBIP nXS. Also,
`needsreg` and `optreg` are really just a 3-state operand policy in
disguise. Likewise, the PLBI multiclass has this same issue.

Change `needsreg` and `optreg` into a combined fake enum, so it's
clearer whether the instruction takes no register operand, a required
register operand or an optional register operand.

This improves on my original change 66e8270e8.
DeltaFile
+127-121llvm/lib/Target/AArch64/AArch64SystemOperands.td
+127-1211 files

LLVM/project 91dae5dllvm/test/CodeGen/AMDGPU fract-match.ll

AMDGPU: Regenerate test checks
DeltaFile
+23-2llvm/test/CodeGen/AMDGPU/fract-match.ll
+23-21 files

LLVM/project e830d88clang/lib/Analysis UnsafeBufferUsage.cpp, clang/test/SemaCXX warn-unsafe-buffer-usage-default-arg-uninstantiated-crash.cpp

[UnsafeBufferUsage] Check for uninstantiated default arguments to prevent crash. (#188817)

Fix a crash introduced by
https://github.com/llvm/llvm-project/pull/184899

The -Wunsafe-buffer-usage analysis was crashing when it encountered a
template function with a default argument that hadn't been instantiated
yet. This occurred in populateStmtsForFindingGadgets when it attempted
to access the default argument of each parameter.

This fix adds a check to ensure the default argument is instantiated
before attempting to access it.

Assisted-by: Gemini
DeltaFile
+13-0clang/test/SemaCXX/warn-unsafe-buffer-usage-default-arg-uninstantiated-crash.cpp
+2-1clang/lib/Analysis/UnsafeBufferUsage.cpp
+15-12 files

LLVM/project 0d3e514lldb/source/DataFormatters TypeSynthetic.cpp, lldb/test/API/functionalities/data-formatter/bytecode-synthetic TestBytecodeSynthetic.py main.cpp

[lldb] Enable caching for BytecodeSyntheticChildren::FrontEnd::Update (#181199)

Update `BytecodeSyntheticChildren` to support `ChildCacheState` return
values from `@update` implementations.
DeltaFile
+24-1lldb/source/DataFormatters/TypeSynthetic.cpp
+19-1lldb/test/API/functionalities/data-formatter/bytecode-synthetic/TestBytecodeSynthetic.py
+4-1lldb/test/API/functionalities/data-formatter/bytecode-synthetic/main.cpp
+47-33 files

LLVM/project 821c22alldb/examples/python formatter_bytecode.py, lldb/test/Shell/ScriptInterpreter/Python python-bytecode.test

[lldb][bytecode] Change compiler to require update return type decl (#188637)

To better ensure that bytecode `@update` implementations return a 0/1
value (see https://github.com/llvm/llvm-project/pull/181199), this
changes the Python -> formatter bytecode compiler to require that Python
`update` methods be declared to return `bool`.

A declaration like this will be a compiler error:

```py
def update(self):
    # implementation...
```
DeltaFile
+4-4lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/RigidArrayLLDBFormatterSwift.txt
+7-0lldb/examples/python/formatter_bytecode.py
+3-3lldb/test/Shell/ScriptInterpreter/Python/Inputs/FormatterBytecode/RigidArrayLLDBFormatterC.txt
+2-1lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test
+16-84 files

LLVM/project df71894llvm/lib/Target/AMDGPU VOP3Instructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.cvt.scalef32.pk.gfx950.ll

[AMDGPU] Do not overlap dst with srcs for v_cvt_scalef32_2xpk16_fp6/bf6_f32  (#188809)

v_cvt_scalef32_2xpk16_fp6_f32 and v_cvt_scalef32_2xpk16_bf6_f32, as multipass instructions,
the destination operand must not overlap with any of the source operands.
In this work, we apply Constraints = "@earlyclobber $vdst" to these two instructions.

Fixes: LCCOMPILER-561
DeltaFile
+68-68llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.gfx950.ll
+1-1llvm/lib/Target/AMDGPU/VOP3Instructions.td
+69-692 files

LLVM/project cb1661bllvm/lib/Transforms/Vectorize VPlanUnroll.cpp, llvm/test/Transforms/LoopVectorize tail-folding-optimize-vector-induction-width.ll struct-return-replicate.ll

[VPlan] Explicitly unroll replicate-regions without live-outs by VF. (#170212)

This patch adds a new replicateReplicateRegionsByVF transform to
unroll replicate=regions by VF, dissolving them. The transform creates
VF copies of the replicate-region's content, connects them and converts
recipes to single-scalar variants for the corresponding lanes.

The initial version skips regions with live-outs (VPPredInstPHIRecipe),
which will be added  in follow-up patches.

Depends on https://github.com/llvm/llvm-project/pull/170053

PR: https://github.com/llvm/llvm-project/pull/170212
DeltaFile
+156-0llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+49-98llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+40-80llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+43-41llvm/test/Transforms/LoopVectorize/VPlan/vplan-predicate-switch.ll
+9-18llvm/test/Transforms/LoopVectorize/tail-folding-optimize-vector-induction-width.ll
+6-14llvm/test/Transforms/LoopVectorize/struct-return-replicate.ll
+303-25154 files not shown
+420-53160 files

LLVM/project e849c68libcxx/utils/ci/docker linux-builder-base.dockerfile

[libc++] Install venv in the CI Docker image (#188825)

To support #165769
DeltaFile
+1-0libcxx/utils/ci/docker/linux-builder-base.dockerfile
+1-01 files