LLVM/project 3658dafclang/lib/Basic/Targets OSTargets.h

[Driver] Switch clang++ to default Solaris 11.4 compilation environment (#201063)

`clang++` has long followed `g++`'s lead predefining `_XOPEN_SOURCE=600`
on Solaris. As detailed in [Switch g++ to default Solaris 11.4
compilation
environment](https://gcc.gnu.org/pipermail/gcc-patches/2026-May/716990.html),
this is no longer necessary in Solaris 11.4.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
DeltaFile
+0-1clang/lib/Basic/Targets/OSTargets.h
+0-11 files

LLVM/project 824fc06mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp, mlir/test/Target/LLVMIR omptarget-declare-target-llvm-device-2.mlir

[Flang][OpenMP] Declare Target fixes for USM and declare target to (#200248)

Currently declare target enter would fall through the if statement even
though it's a synonym of declare target to, so fix this via adding a
simpler and more readable check for link clause instead.

USM declare target to works a little differently to regular link cases,
where the type is actually converted into a pointer, rather than a
global of the original typing. So, add a caveat where we convert the
type to a pointer if requires usm has been triggered. This gets the
correct behaviour in USM mode on USM devices.
DeltaFile
+50-0mlir/test/Target/LLVMIR/omptarget-declare-target-llvm-device-2.mlir
+22-21mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+72-212 files

LLVM/project e3bc082llvm/lib/Target/PowerPC PPCTargetMachine.cpp, llvm/test/CodeGen/PowerPC aix-codemodel.ll ppc-i128-cmp.ll

[AIX][LLVM] Update the default code model for 64-bit (#199301)

This changes the default code model on 64-bit AIX to large.

For many applications, the existing small code model is simply
inadequate to build. Users often then end up relying on expensive linker
fixups (i.e. -Wl,-bigtoc) to work around the issue when they would have
been better served by moving to the larger code model. Our analysis and
benchmarking leads us to believe this's generally a net benefit to
users.

(Assisted by AI)
DeltaFile
+24-0llvm/test/CodeGen/PowerPC/aix-codemodel.ll
+5-1llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+1-1llvm/test/CodeGen/PowerPC/ppc-i128-cmp.ll
+30-23 files

LLVM/project 836bf56llvm/include/llvm/ADT CachedHashString.h DenseMapInfo.h

[ADT] Remove unused DenseMapInfo::getTombstoneKey (#200959)

#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.
DeltaFile
+12-28llvm/include/llvm/ADT/CachedHashString.h
+0-32llvm/include/llvm/ADT/DenseMapInfo.h
+0-13llvm/include/llvm/ADT/BitVector.h
+0-13llvm/include/llvm/ADT/SmallBitVector.h
+0-9llvm/include/llvm/ADT/ArrayRef.h
+0-8llvm/include/llvm/ADT/APFixedPoint.h
+12-10320 files not shown
+13-18626 files

LLVM/project b65054fllvm/include/llvm/Transforms/Utils TriggerCrashPass.h, llvm/lib/CodeGen TargetPassConfig.cpp

Reland [LLVM] Add flags to crash the opt/codegen pipeline (#201146)

Will be used for testing crash reduction.

Reland of #200967. Test needs `REQUIRES: backtrace`.
DeltaFile
+43-0llvm/lib/Transforms/Utils/TriggerCrashPass.cpp
+39-0llvm/include/llvm/Transforms/Utils/TriggerCrashPass.h
+1-22llvm/lib/Passes/PassBuilder.cpp
+15-0llvm/test/Other/trigger-crash-flags.ll
+10-0llvm/lib/CodeGen/TargetPassConfig.cpp
+8-0llvm/lib/Passes/PassBuilderPipelines.cpp
+116-222 files not shown
+118-228 files

LLVM/project a661558llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.sched.group.barrier.gfx12.ll

[AMDGPU] Add IGLP mutations to CoexecSched (#200981)

Adds IGLP mutations support to CoexecSched -- regular handling of this
mutation in GCNSchedStage is implemented in GCNSchedStrategy.cpp
DeltaFile
+116-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sched.group.barrier.gfx12.ll
+4-1llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+120-12 files

LLVM/project af5506cllvm/test/CodeGen/RISCV callee-saved-gprs.ll vararg.ll, llvm/test/CodeGen/RISCV/GlobalISel vararg.ll

Revert "[RISCV] Prefer SP over FP for frame index access when offset fits within compressed immediate range. (#193962)" (#201041)

This reverts commits:

* 46e07d38e078799fa83386ef2b3b5ee423a467c5
* b5d577d3faef34276991fe80b5f869e3f8ef7442

This change is causing a miscompile in zstd, see the discussion under
https://github.com/llvm/llvm-project/pull/193962 for more details.
DeltaFile
+316-316llvm/test/CodeGen/RISCV/callee-saved-gprs.ll
+303-295llvm/test/CodeGen/RISCV/vararg.ll
+246-241llvm/test/CodeGen/RISCV/GlobalISel/vararg.ll
+224-224llvm/test/CodeGen/RISCV/qci-interrupt-attr.ll
+128-128llvm/test/CodeGen/RISCV/xqccmp-callee-saved-gprs.ll
+75-75llvm/test/CodeGen/RISCV/xqccmp-push-pop-popret.ll
+1,292-1,27919 files not shown
+1,477-1,48825 files

LLVM/project 22ef7baclang/include/clang/Basic DiagnosticIDs.h

[clang][NFC] Bump the maximum number of Sema diagnostics (#200948)

The number of Sema diagnostics in DiagnosticSemaKinds.td has reached the
5000 limit. This PR increases the max limit to 6000.
DeltaFile
+1-1clang/include/clang/Basic/DiagnosticIDs.h
+1-11 files

LLVM/project 7b199bdlldb/include/lldb/Symbol Symbol.h

[lldb] Fix Symbol static_assert for 32 bit Windows (#201130)

Follow up to
https://github.com/llvm/llvm-project/pull/200919#issuecomment-4600914496
DeltaFile
+1-1lldb/include/lldb/Symbol/Symbol.h
+1-11 files

LLVM/project 9f790fcllvm/lib/Target/SPIRV SPIRVBuiltins.cpp, llvm/test/CodeGen/SPIRV/transcoding enqueue_kernel.ll

[SPIR-V] Fix i8 pointer type for NULL events in OpEnqueueKernel (#201125)
DeltaFile
+25-17llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+2-4llvm/test/CodeGen/SPIRV/transcoding/enqueue_kernel.ll
+27-212 files

LLVM/project 45ebcb4mlir/include/mlir/Dialect/SCF/IR SCFOps.td, mlir/lib/Dialect/SCF/IR SCF.cpp

allow early exit from execute_region
DeltaFile
+702-0mlir/test/Dialect/SCF/lower-early-exit.mlir
+487-0mlir/lib/Dialect/SCF/Transforms/LowerEarlyExit.cpp
+287-51mlir/lib/Dialect/SCF/IR/SCF.cpp
+143-0mlir/test/Dialect/Arith/int-range-early-exit.mlir
+103-12mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
+86-0mlir/test/Analysis/DataFlow/test-early-exit.mlir
+1,808-6322 files not shown
+2,457-19328 files

LLVM/project cf25fb1flang/lib/Semantics check-omp-metadirective.cpp check-omp-structure.cpp, flang/test/Semantics/OpenMP declare-variant-match.f90 declare-variant.f90

[flang][OpenMP] Add structure checks for DECLARE VARIANT (#198799)

This PR adds declare-variant structure checking. Following checks are
added:

- Validate [base:]variant arguments (including implicit base for
single-name form).
- Require exactly one MATCH clause; reject a second MATCH on the same
directive.
- Reject duplicate (base, variant) across multiple declare variant
directives.
- Reject clauses not allowed on declare variant.
- Apply shared context-selector checks to MATCH (reuse metadirective
logic).
- Require constant user conditions in MATCH for declare variant (dynamic
selectors deferred).

Refactor metadirective support:


    [4 lines not shown]
DeltaFile
+162-5flang/lib/Semantics/check-omp-metadirective.cpp
+118-0flang/test/Semantics/OpenMP/declare-variant-match.f90
+1-53flang/lib/Semantics/check-omp-structure.cpp
+30-0flang/test/Semantics/OpenMP/declare-variant.f90
+6-0flang/lib/Semantics/check-omp-structure.h
+317-585 files

LLVM/project 516867bllvm/lib/CodeGen PseudoProbeInserter.cpp, llvm/test/CodeGen/AArch64 aarch64-pseudo-probe-tail-call.ll

[PseudoProbe] Preserve pseudoprobe for tailcall pseudo instrs (#197246)

Preserve probes for tail call pseudo instructions. 

On AArch64, X86, and other platforms, the lowering of tail calls
requires a pseudo instruction like `TCRETURNdi`. It is often the case
that `TCRETURNdi` is within its own MBB, and the direct call probe
associated with that tail call is considered dangling and removed. This
patch tries to preserve that.
DeltaFile
+47-0llvm/test/CodeGen/X86/pseudo-probe-tail-call.ll
+46-0llvm/test/CodeGen/AArch64/aarch64-pseudo-probe-tail-call.ll
+15-3llvm/lib/CodeGen/PseudoProbeInserter.cpp
+108-33 files

LLVM/project 3248c01llvm/include/llvm/Analysis TargetLibraryInfo.h, llvm/lib/Analysis TargetLibraryInfo.cpp

better/less hacky implementation

Created using spr 1.3.8-wip
DeltaFile
+37-36llvm/lib/Analysis/TargetLibraryInfo.cpp
+3-5llvm/include/llvm/Analysis/TargetLibraryInfo.h
+40-412 files

LLVM/project 9083fb2llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/test/CodeGen/AArch64 special-reg.ll machine-sme-abi-find-insert-pt.mir

Revert "[AArch64] Fix definition of system register move instructions" (#201137)

Reverts llvm/llvm-project#185709
DeltaFile
+1,044-1,044llvm/lib/Target/AArch64/AArch64SystemOperands.td
+17-19llvm/test/MC/Disassembler/AArch64/armv8.7a-xs.txt
+11-24llvm/test/CodeGen/AArch64/special-reg.ll
+17-17llvm/test/MC/Disassembler/AArch64/armv8.8a-nmi.txt
+13-13llvm/test/CodeGen/AArch64/machine-sme-abi-find-insert-pt.mir
+0-26llvm/test/CodeGen/AArch64/arm64-invalid-sys-reg.ll
+1,102-1,14328 files not shown
+1,204-1,34634 files

LLVM/project 63a1b9dllvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 sve-ldst-multi-vec.mir

[AArch64][SME] Add multi-vector store/load opcodes to getMemOpInfo (#201073)

Follow-up to #200238
DeltaFile
+667-0llvm/test/CodeGen/AArch64/sve-ldst-multi-vec.mir
+112-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+779-02 files

LLVM/project 0212229.ci/green-dragon lldb-windows.groovy

[CI] install packaging before running lldb tests on Windows (#201112)

https://ci-external.swift.org/job/lldb-windows/job/main/ is failing
because lldb API tests require the `packaging` module.

This patch installs it before running the `check-lldb` target.
DeltaFile
+2-0.ci/green-dragon/lldb-windows.groovy
+2-01 files

LLVM/project 75334ffllvm/include/llvm/Analysis TargetLibraryInfo.h, llvm/lib/Analysis TargetLibraryInfo.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+135-48llvm/lib/Analysis/TargetLibraryInfo.cpp
+0-115llvm/unittests/Analysis/ReplaceWithVecLibTest.cpp
+34-19llvm/include/llvm/Analysis/TargetLibraryInfo.h
+0-1llvm/unittests/Analysis/CMakeLists.txt
+169-1834 files

LLVM/project 350fc57llvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp

[review] Reduce compile-time overhead.
DeltaFile
+13-11llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+13-111 files

LLVM/project 726aafcllvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp

[reviews] reduce overhead
DeltaFile
+8-6llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+8-61 files

LLVM/project 436e661llvm/test/CodeGen/AMDGPU udiv-miscompilation.ll

[reviews] Improve test.
DeltaFile
+70-2llvm/test/CodeGen/AMDGPU/udiv-miscompilation.ll
+70-21 files

LLVM/project 2b8509cllvm/test/CodeGen/AMDGPU div-rem-fast-path.ll udiv-miscompilation.ll

[reviews] Add full pipeline test and remove previous one.

Co-authored-by: Carlo Bertolli <carlo.bertolli at amd.com>
DeltaFile
+694-0llvm/test/CodeGen/AMDGPU/div-rem-fast-path.ll
+0-102llvm/test/CodeGen/AMDGPU/udiv-miscompilation.ll
+694-1022 files

LLVM/project 2f1ddc0llvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp, llvm/test/CodeGen/AMDGPU udivrem24.ll udiv.ll

[AMDGPU] Fix LowerDIVREM24 lowering for the unsigned case

The code was not properly checking that the operands were
24-bit integers for the unsigned case.
DeltaFile
+70-78llvm/test/CodeGen/AMDGPU/udivrem24.ll
+19-22llvm/test/CodeGen/AMDGPU/udiv.ll
+34-0llvm/test/CodeGen/AMDGPU/udiv-miscompilation.ll
+14-6llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+137-1064 files

LLVM/project b54d214llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp, llvm/test/MC/RISCV rvi-pseudos.s

[llvm][RISCV][MC] Fix arithmetic error in pseudo parsing (#200217)

When arithmetic was used in RISCV pseudo instructions, like lla, the
custom parsing breaks the associativity of the operators by parsing the
entire remainder of an expression. This would lead to scenarios where we
would parse `top - 0x100 -0x10` as `top - (0x100 -0x10)` and yield the
wrong offset (`0xF0`(wrong) vs. `0x110`(correct)).

Instead, don't advance the parser and just examine the token to
determine if it's an identifier and if we should handle this case or
bail out. In cases we do handle, just use `parseExpression()`, which
will handle this correctly.
DeltaFile
+5-31llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+6-0llvm/test/MC/RISCV/rvi-pseudos.s
+11-312 files

LLVM/project 3dfd4f7clang/include/clang/Analysis/Analyses/LifetimeSafety LoanPropagation.h, clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp

[LifetimeSafety] Refactor buildOriginFlowChain to use PImpl pattern (#201071)

Move `buildOriginFlowChain` into `AnalysisImpl`, removing `FactManager`
parameter
DeltaFile
+46-40clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+2-2clang/include/clang/Analysis/Analyses/LifetimeSafety/LoanPropagation.h
+0-1clang/unittests/Analysis/LifetimeSafetyTest.cpp
+48-433 files

LLVM/project f834b7foffload/plugins-nextgen/level_zero/include L0CmdListManager.h L0Queue.h, offload/plugins-nextgen/level_zero/src L0Device.cpp L0Queue.cpp

[OFFLOAD][L0] Move dataFence logic to L0Queue (#201046)

The dataFence device operation logic was still on L0Device. With this all the operations working on command lists have their logic consolidated in L0Queue.
DeltaFile
+1-12offload/plugins-nextgen/level_zero/src/L0Device.cpp
+8-0offload/plugins-nextgen/level_zero/include/L0CmdListManager.h
+6-2offload/plugins-nextgen/level_zero/include/L0Queue.h
+5-0offload/plugins-nextgen/level_zero/src/L0Queue.cpp
+20-144 files

LLVM/project e8f518dllvm/include/llvm/Analysis VectorUtils.h, llvm/lib/Analysis VectorUtils.cpp

[VectorUtils] Replace maskIsAll{Zero,One}OrUndef with PatternMatch (#200040)

As part of the ongoing effort to deprecate UndefValue, and also to take
better advantage of pattern matching, eliminate the VectorUtils
functions `maskIsAllZeroOrUndef`/`maskIsAllOneOrUndef` and replace them
with new matchers `m_ZeroOrPoison` and `m_AllOnesOrPoison`.

The new matchers are simply `m_CombineOr` on `m_Zero`/`m_AllOnes` and
`m_Poison`. `m_Zero` and `m_AllOnes` already match vectors where some
(but not all) elements are poison, so these matchers were created to
also match the case where all elements are poison.

This affects InstCombine/InstSimplify with a mask containing `undef` for
the intrinsics `llvm.masked.load`, `llvm.masked.store`,
`llvm.masked.gather`, and `llvm.masked.scatter`.

Some relevant tests were altered to use poison instead of undef, and
test coverage for masked loads/stores with poison was increased.
DeltaFile
+0-52llvm/lib/Analysis/VectorUtils.cpp
+19-3llvm/test/Transforms/InstCombine/masked_intrinsics.ll
+10-8llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+0-10llvm/include/llvm/Analysis/VectorUtils.h
+3-3llvm/test/Transforms/InstSimplify/call.ll
+3-3llvm/test/Transforms/InstCombine/masked_intrinsics-inseltpoison.ll
+35-793 files not shown
+44-839 files

LLVM/project d81e8afllvm/lib/Target/AMDGPU GCNSchedStrategy.cpp GCNSchedStrategy.h, llvm/test/CodeGen/AMDGPU rewrite-mfma-form-spill-cost-reset.ll

[AMDGPU] RewriteMFMAFormStage: fix SpillCost early-return missing reset (#199708)

Extract resetRewriteCandsToVGPR() to consolidate the logic that restores
MFMA candidates from AGPR form back to VGPR form after cost analysis.

getRewriteCost() returned early when SpillCost > 0 without resetting the
AGPR-form register classes set by initHeuristics(), leaving MRI in a
corrupted state. Call resetRewriteCandsToVGPR() on both the early-return
path and the normal exit path to fix this.

Also change getRewriteCost() and rewrite() to take ArrayRef instead of
const std::vector& for cleaner API.

---------

Co-authored-by: Claude Sonnet 4 (1M context) <noreply at anthropic.com>
DeltaFile
+642-0llvm/test/CodeGen/AMDGPU/rewrite-mfma-form-spill-cost-reset.ll
+33-27llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+6-3llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
+681-303 files

LLVM/project 6bcdd84llvm/lib/Target/X86 X86ISelLowering.cpp X86InstrCompiler.td, llvm/test/CodeGen/X86 bt-merge-fuse.ll bittest-big-integer.ll

[X86] Merge BT with a matching BTR/BTS/BTC (#193612)

Fixes #165291.

BTR/BTS/BTC set CF from the pre-operation bit value, so a subsequent BT
on the same source and bit index produces the same CF and is redundant.
We were emitting both.

```ll
define i1 @btr_eq_i32(ptr %word, i32 %position) nounwind {
  %ofs = and i32 %position, 31
  %bit = shl nuw i32 1, %ofs
  %mask = xor i32 %bit, -1
  %ld = load i32, ptr %word
  %test = and i32 %ld, %bit
  %res = and i32 %ld, %mask
  %cmp = icmp eq i32 %test, 0
  store i32 %res, ptr %word
  ret i1 %cmp

    [37 lines not shown]
DeltaFile
+343-0llvm/test/CodeGen/X86/bt-merge-fuse.ll
+116-194llvm/test/CodeGen/X86/bittest-big-integer.ll
+97-0llvm/lib/Target/X86/X86ISelLowering.cpp
+12-0llvm/lib/Target/X86/X86InstrCompiler.td
+8-0llvm/lib/Target/X86/X86InstrFragments.td
+576-1945 files

LLVM/project f813817llvm/lib/Target/SPIRV SPIRVBuiltins.cpp, llvm/test/CodeGen/SPIRV/transcoding/OpenCL convert_signedness.ll

[SPIR-V] Select int-to-int convert opcode from source signedness (#201116)

OpSConvert/OpUConvert sext/zext is determined by the source operand, not
the destination type. Discovered in
https://github.com/llvm/llvm-project/pull/200791/changes#r3341230426

Fix a regression caused by #200791
DeltaFile
+67-0llvm/test/CodeGen/SPIRV/transcoding/OpenCL/convert_signedness.ll
+3-4llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+70-42 files