LLVM/project a938559 — llvm/lib/Transforms/InstCombine InstCombineShifts.cpp, llvm/test/Transforms/InstCombine pull-conditional-binop-through-shift.ll

[InstCombine] Keep branch weights when folding a shift through a select (#227987)

Pulling a binop out of a select and through a constant shift rebuilds
the select, and the new one was losing the original branch weights. Copy
!prof so the weights stay attached to the same condition.
DeltaFile
+61-0llvm/test/Transforms/InstCombine/pull-conditional-binop-through-shift.ll
+4-2llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+65-22 files

LLVM/project 0dabfe3 — llvm/lib/CodeGen MachineBasicBlock.cpp, llvm/test/CodeGen/AMDGPU phi-elimination-split-critical-edge-undef-phi-source.mir

CodeGen: Fix stale live range for undef PHI sources on split edges

SplitCriticalEdge collects the PHI sources coming from the new block so
the trimming loop below does not undo the segment just added for them.
An undef operand gets no segment, but was still added to the set, so a
register that is only an undef PHI operand on the split edge kept the
stale extension of its live range through the new block.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+36-0llvm/test/CodeGen/AMDGPU/phi-elimination-split-critical-edge-undef-phi-source.mir
+1-1llvm/lib/CodeGen/MachineBasicBlock.cpp
+37-12 files

LLVM/project f039a4b — llvm/lib/CodeGen MachineBasicBlock.cpp

CodeGen: Check subrange liveness directly when trimming split edges

SplitCriticalEdge trims the stale extension of a live range into the newly
created block. The subrange guard used overlaps(StartIndex, EndIndex), which
happens to work only because insertMBBInMaps creates exactly one fresh index for
the new block, so no pre-existing segment endpoint can fall strictly inside the
range. That only happens to make makes overlap equivalent to containment.

Check liveAt(PrevIndex) instead, mirroring the same condition on the main range.

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+3-1llvm/lib/CodeGen/MachineBasicBlock.cpp
+3-11 files

LLVM/project d4c8ec0 — llvm/test/CodeGen/AMDGPU phi-elimination-split-critical-edge-nonoverlapping-subrange.mir phi-elimination-split-critical-edge-subranges.mir

AMDGPU: Merge live interval critical edge splitting tests
DeltaFile
+74-0llvm/test/CodeGen/AMDGPU/phi-elimination-split-critical-edge-subranges.mir
+0-43llvm/test/CodeGen/AMDGPU/phi-elimination-split-critical-edge-nonoverlapping-subrange.mir
+74-432 files

LLVM/project 2ccba9a — polly/lib/Analysis ScopBuilder.cpp, polly/test/ScopInfo assume_in_non_affine_subregion.ll

[Polly] Fix assertion in addUserAssumptions for unreachable blocks (#227311)

ScopBuilder::addUserAssumptions() crashes when an llvm.assume call
resides in a block that has no entry in InvalidDomainMap. This happens
when __builtin_unreachable() is converted to llvm.assume by earlier
passes, but Polly's buildDomainsWithBranchConstraints() skips the block
(e.g. due to an UnreachableInst terminator), leaving its
InvalidDomainMap entry uninitialized.
Skip such assumptions instead of asserting.

Fixes #226718
DeltaFile
+56-0polly/test/ScopInfo/assume_in_non_affine_subregion.ll
+9-0polly/lib/Analysis/ScopBuilder.cpp
+65-02 files

LLVM/project d240a0b — lldb/test/API/functionalities/thread/exit_during_step TestExitDuringStep.py, lldb/test/API/functionalities/thread/thread_exit TestThreadExit.py

[lldb][test] Use external debug info on Arm in TestExitDuringStep and TestThreadExit (#228047)

Arm has to care about Arm and Thumb modes, so without the separate debug
info file installed by libc6-dbg on Linux, we cannot backtrace if the
starting point is in a libc function.

This is the case for these tests where a thread may be stopped in a libc
syscall wrapper.

As the backtrace wasn't working, the code added by #227312 did not see
that some threads were part of the main executable, which made both
these tests fail on Arm Linux.

It's possible we should be running more tests on Arm with this option
on, but for now I just want to get the bot back to green.

More details in https://github.com/llvm/llvm-project/issues/228014.
DeltaFile
+5-0lldb/test/API/functionalities/thread/thread_exit/TestThreadExit.py
+5-0lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
+10-02 files

LLVM/project 0489b48 — llvm/lib/Target/Mips MipsCallLowering.cpp, llvm/test/CodeGen/Mips/GlobalISel/irtranslator global_address_pic.ll call.ll

Mips/GlobalISel: Fix adding $gp to calls as a def instead of a use (#227679)

A PIC call needs $gp to point at the GOT for the lazy binding stub.
SelectionDAG adds it as an ordinary argument register. GlobalISel
instead added it as an implicit def, which killed the $gp copy set up
right before the call.

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+3-3llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll
+2-2llvm/test/CodeGen/Mips/GlobalISel/irtranslator/global_address_pic.ll
+1-1llvm/lib/Target/Mips/MipsCallLowering.cpp
+6-63 files

LLVM/project 4d42da6 — flang/lib/Semantics semantics.cpp

Add #include to make type complete
DeltaFile
+1-0flang/lib/Semantics/semantics.cpp
+1-01 files

LLVM/project 5e5efc9 — flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics openmp-utils.cpp check-omp-structure.cpp

[flang][OpenMP] Remember decision of allowing past/future clause

When a deprecated or a future clause is used on a directive, and it is
allowed with a warning, remember that decision and consider that clause
allowed on that directive in all subsequent checks.

Introduce an OpenMPKartoffel warning category to guard these warnings
(and the corresponding -Wopenmp-kartoffel option).
DeltaFile
+32-18flang/lib/Semantics/check-omp-structure.cpp
+34-5flang/lib/Semantics/openmp-utils.cpp
+15-15flang/test/Semantics/OpenMP/declare-target02.f90
+5-24flang/test/Semantics/OpenMP/if-clause-45.f90
+13-13flang/test/Semantics/OpenMP/declare-target01.f90
+19-0flang/include/flang/Semantics/openmp-utils.h
+118-7522 files not shown
+180-12128 files

LLVM/project 2a7688b — flang/lib/Semantics check-omp-structure.cpp, flang/test/Lower/OpenMP compound-version-override.f90

When allowing a clause on compound dir, also allow it on leafs

Not all leafs, just those that allow it in a future version
DeltaFile
+26-13flang/lib/Semantics/check-omp-structure.cpp
+33-0flang/test/Lower/OpenMP/compound-version-override.f90
+0-1flang/test/Semantics/OpenMP/if-clause-45.f90
+59-143 files

LLVM/project 8ff1a1d — flang/test/Semantics/OpenMP threadset-clause.f90 if-clause-45.f90

Introduce -Wopenmp-deprecated and -Wopenmp-future
DeltaFile
+15-15flang/test/Semantics/OpenMP/declare-target02.f90
+13-13flang/test/Semantics/OpenMP/declare-target01.f90
+7-7flang/test/Semantics/OpenMP/atomic.f90
+4-4flang/test/Semantics/OpenMP/if-clause-45.f90
+4-4flang/test/Semantics/OpenMP/allocate-clause-version.f90
+2-2flang/test/Semantics/OpenMP/threadset-clause.f90
+45-4513 files not shown
+63-6219 files

LLVM/project a04805e — llvm/test/Transforms/SLPVectorizer/AArch64 gather-buildvector-with-minbitwidth-user.ll

SLP: Remove artificial shifts from min-bitwidth test (NFC) (#222634)

Replace shifts by zero with zero constants, using a slightly negative
threshold to preserve the test signal. This allows a future update to
the cost of foldable shifts.
DeltaFile
+44-46llvm/test/Transforms/SLPVectorizer/AArch64/gather-buildvector-with-minbitwidth-user.ll
+44-461 files

LLVM/project 66008b7 — llvm/include/llvm/Frontend/OpenMP OMP.h OMPDescriptors.h, llvm/unittests/Frontend EnumSetTest.cpp

[OpenMP] Add default value for Size argument in EnumSet (#227853)

Most of the interesting enums cover a contiguous range of values, and
define members First_ and Last_. By subtracting the underlying values
one can get the number of elements in the enum.
DeltaFile
+3-15llvm/include/llvm/Frontend/OpenMP/OMPDescriptors.h
+8-3llvm/include/llvm/Frontend/OpenMP/OMP.h
+1-1llvm/unittests/Frontend/EnumSetTest.cpp
+12-193 files

LLVM/project e996ce0 — llvm/lib/Transforms/Vectorize LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/AArch64 maxbandwidth-regpressure.ll predication_costs.ll

[LV][NFC] Print more debug to account for mismatch in final costs (#227757)

After printing out the costs of recipes we then print out the total
cost, including the cost per lane. Unfortunately, the final cost often
doesn't match the total of all the recipe costs due to extra precomputed
costs and reg spill costs. This PR adds the missing information.
DeltaFile
+9-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+6-0llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
+4-0llvm/test/Transforms/LoopVectorize/AArch64/maxbandwidth-regpressure.ll
+19-23 files

LLVM/project a9c5e57 — clang/docs ReleaseNotes.md, clang/lib/Sema SemaExpr.cpp

[clang] Fix crash with follow-on diagnostics w/invalid logical operator (#227837)

If the logical operator involves a vector operand, we perform special
vector-specific checks. `CheckVectorOperands()` returns a null QualType
to signal there was an issue, and `CheckVectorLogicalOperands()` was
using that signal to decide to report an "invalid operands to binary
expression" diagnostic. However, `CheckVectorOperands()` also sometimes
modifies the given LHS and RHS values and when that happens, the caller
cannot assume they're still valid on a null QualType return. This was
causing a crash from `CheckVectorLogicalOperands()` because it was
attempting to use those newly invalidated expressions.

This fixes the crash by letting `CheckVectorOperands()` report the
diagnostics directly and removing the fallback logic from
`CheckVectorLogicalOperands()`. This also helpfully removes some
unhelpful follow-on diagnostics in other cases where we would report
"cannot convert operands" followed by "invalid operands to binary
expression".

Fixes #227588
DeltaFile
+29-12clang/test/Sema/vector-ops.c
+0-4clang/test/SemaCXX/vector.cpp
+2-2clang/lib/Sema/SemaExpr.cpp
+1-1clang/test/Sema/fp16vec-sema.c
+1-0clang/docs/ReleaseNotes.md
+33-195 files

LLVM/project ec1f5ec — flang/docs OpenMPSupport.md, flang/lib/Lower/OpenMP OpenMP.cpp

[flang][OpenMP] Sink intervening code unguarded into collapsed loop body (#225159)

### Summary

Lower intervening code in a collapsed imperfect loop nest by sinking it
unguarded into the innermost `omp.loop_nest` body, so it executes once
per collapsed logical iteration. Per OpenMP 6.0 6.4.3.

An earlier implementation of this work guarded intervening code so that
it ran once per enclosing iteration. That required recomputing the inner
loop's bounds inside the region — and in a `target` region, either
accessing or re-evaluating
the enclosing `omp.target`'s `host_eval` bounds (#223475) — which
overcomplicates the solution and is not required by the spec. Sinking
the intervening code removes all bound arithmetic from the region, while
the execution count remains within the permitted range.

### Notes
Fixes #199092 
Assisted-by: Copilot
DeltaFile
+214-371flang/test/Lower/OpenMP/collapse-imperfect-nest.f90
+10-139flang/lib/Lower/OpenMP/OpenMP.cpp
+96-0offload/test/offloading/fortran/target-teams-distribute-collapse-intervening.f90
+0-28flang/test/Lower/OpenMP/collapse-target-intervening-todo.f90
+1-1flang/docs/OpenMPSupport.md
+321-5395 files

LLVM/project 0704576 — llvm/lib/Target/AMDGPU VOPInstructions.td VOP1Instructions.td, llvm/test/MC/AMDGPU gfx9-asm-err.s dpp-err.s

[AMDGPU] Reject 64-bit VOP1 DPP on gfx8/gfx9 (#220834)

64-bit DPP needs FeatureDPALU_DPP (gfx90a+), but HasDPALU_DPP is missing
GCN3Encoding gate that HasDPP has
DeltaFile
+14-0llvm/test/MC/AMDGPU/dpp-err.s
+7-0llvm/test/MC/Disassembler/AMDGPU/gfx9_dasm_err.txt
+1-3llvm/lib/Target/AMDGPU/VOP1Instructions.td
+4-0llvm/lib/Target/AMDGPU/AMDGPU.td
+1-1llvm/test/MC/AMDGPU/gfx9-asm-err.s
+1-1llvm/lib/Target/AMDGPU/VOPInstructions.td
+28-56 files

LLVM/project fec418c — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorizationLegality.cpp, llvm/test/Transforms/LoopVectorize early_exit_combined_exits_epilogue.ll early_exit_with_stores.ll

[LV] Vectorize uncountable early exit store loops with combined conditions (#205109)

Support the case where both the countable and uncountable exit
conditions have been combined by earlier passes.
DeltaFile
+406-9llvm/test/Transforms/LoopVectorize/early_exit_combined_exits.ll
+117-29llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+122-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+75-4llvm/test/Transforms/LoopVectorize/early_exit_with_stores.ll
+73-0llvm/test/Transforms/LoopVectorize/early_exit_combined_exits_epilogue.ll
+72-0llvm/test/Transforms/LoopVectorize/VPlan/early_exit_with_stores_vplan.ll
+865-4712 files not shown
+988-6618 files

LLVM/project 7f5794c — llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine umulh.ll smulh.ll

[InstCombine] SimplifyDemandedVectorElts - add smulh/umulh handling (#228027)
DeltaFile
+6-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-3llvm/test/Transforms/InstCombine/umulh.ll
+1-3llvm/test/Transforms/InstCombine/smulh.ll
+8-63 files

LLVM/project be26b1a — llvm/include/llvm/Analysis ConstraintSystem.h, llvm/lib/Analysis ConstraintSystem.cpp

[ConstraintElim] Skip rows implied by a single existing row. (#227688)

There are a number of cases where we add duplicated rows (e.g. from
transferring facts between the signed and unsigned systems, or from
tightening a non-strict bound using !=).

Before adding rows, check if the system already has a row that the same
variable coefficient and a constant that is <= the current constant.

This helps reduce compile-time, as each row adds extra work during
constraint solving:
stage1-O3: -0.02%
stage1-ReleaseThinLTO: -0.05%
stage1-ReleaseLTO-g: -0.02%
stage1-aarch64-O3: -0.00%
stage2-O3: -0.01%
stage2-clang: -0.00%



    [11 lines not shown]
DeltaFile
+23-0llvm/unittests/Analysis/ConstraintSystemTest.cpp
+15-0llvm/lib/Analysis/ConstraintSystem.cpp
+6-1llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+3-0llvm/include/llvm/Analysis/ConstraintSystem.h
+47-14 files

LLVM/project b65cfba — clang/lib/StaticAnalyzer/Core ExplodedGraph.cpp, clang/test/Analysis lifetime-end-path-notes.cpp

[analyzer] Skip LifetimeEnd nodes in getNextStmtForDiagnostics
DeltaFile
+51-0clang/test/Analysis/lifetime-end-path-notes.cpp
+3-0clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+54-02 files

LLVM/project 85692e9 — llvm/lib/Target/X86 X86FastISel.cpp, llvm/test/CodeGen/X86 fast-isel-dead-eflags.ll

X86: Mark the dead EFLAGS clobbers in FastISel i1 masking

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+69-0llvm/test/CodeGen/X86/fast-isel-dead-eflags.ll
+9-4llvm/lib/Target/X86/X86FastISel.cpp
+78-42 files

LLVM/project 1b6934a — llvm/lib/Target/AArch64 MachineSMEABIPass.cpp, llvm/test/CodeGen/AArch64 sme-abi-eh-liveins.mir aarch64-sme-za-call-lowering.ll

AArch64: Mark the dead status flag clobbers in the SME ABI pass

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+51-0llvm/test/CodeGen/AArch64/machine-sme-abi-live-nzcv.mir
+24-13llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
+20-0llvm/test/CodeGen/AArch64/machine-sme-abi-dead-nzcv.ll
+8-8llvm/test/CodeGen/AArch64/machine-sme-abi-find-insert-pt.mir
+4-4llvm/test/CodeGen/AArch64/sme-abi-eh-liveins.mir
+4-4llvm/test/CodeGen/AArch64/aarch64-sme-za-call-lowering.ll
+111-292 files not shown
+115-338 files

LLVM/project 9594aa4 — llvm/lib/Target/AMDGPU AMDGPUSwLowerLDS.cpp, llvm/test/CodeGen/AMDGPU amdgpu-sw-lower-lds-flat-arg-kernel-id.ll

[AMDGPU][SwLowerLDS] Lower non-kernels with LDS instructions and assign kernel IDs to their callers
DeltaFile
+122-84llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
+131-0llvm/test/CodeGen/AMDGPU/amdgpu-sw-lower-lds-flat-arg-kernel-id.ll
+253-842 files

LLVM/project 4b3ddb6 — llvm/lib/Target/AMDGPU SIFixSGPRCopies.cpp, llvm/test/CodeGen/AMDGPU ds_read2.ll merge-m0.mir

[AMDGPU] Don't merge M0 initializations across calls that clobber M0 (#221963)

hoistAndMergeSGPRInits collected clobbers only from
MRI.def_instructions(M0),
which lists explicit defs. Calls clobber M0 via a regmask and were
therefore
invisible, so M0 inits were merged and hoisted across them and the
required
re-init after a call was dropped. Scan the function using
modifiesRegister.

Issue: https://github.com/llvm/llvm-project/issues/221212
DeltaFile
+117-0llvm/test/CodeGen/AMDGPU/merge-m0.mir
+16-2llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+1-0llvm/test/CodeGen/AMDGPU/ds_read2.ll
+134-23 files

LLVM/project 79b6b7a — llvm/lib/Target/AMDGPU SIInstrInfo.cpp

[AMDGPU] Early exit in getSelectConstants. NFC. (#228023)
DeltaFile
+3-1llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+3-11 files

LLVM/project ff7aed5 — clang/docs SanitizerCoverage.md, compiler-rt/lib/sanitizer_common sanitizer_flags.inc sanitizer_coverage_libcdep_new.cpp

[compiler-rt] Add print_coverage_summary to silence SanitizerCoverage dump logs

Coverage dumps still write .sancov files; only the "PCs written" summary is
optional.
DeltaFile
+33-0compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_summary.cpp
+3-2compiler-rt/lib/sanitizer_common/sanitizer_coverage_fuchsia.cpp
+4-0clang/docs/SanitizerCoverage.md
+2-1compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp
+2-0compiler-rt/lib/sanitizer_common/sanitizer_flags.inc
+44-35 files

LLVM/project 4eec78b — clang/test/CodeGen gvn-vectorization-pipeline.c, llvm/include/llvm/Transforms/Scalar GVN.h

- GVN now respects pipeline vectorization settings.
- Loop-access analysis rejects unsuitable indirect stores, retaining PRE.
DeltaFile
+294-2llvm/test/Transforms/GVN/PRE/loop-load-pre-vectorization.ll
+27-6llvm/lib/Transforms/Scalar/GVN.cpp
+14-0clang/test/CodeGen/gvn-vectorization-pipeline.c
+8-0llvm/include/llvm/Transforms/Scalar/GVN.h
+4-2llvm/lib/Passes/PassBuilderPipelines.cpp
+2-1llvm/lib/Passes/PassRegistry.def
+349-112 files not shown
+354-118 files

LLVM/project 707face — llvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN/PRE loop-load-pre-vectorization.ll

[GVN] Preserve vectorization opportunities when PREing loop loads

Loop load PRE can replace an invariant-address load with a loop-carried
PHI and conditional reload after a may-alias store. That scalar recurrence
can prevent vectorization even when runtime alias checks could disambiguate
the original accesses. Subsequent full unrolling then expands scalar code.

Conservatively preserve the header load in innermost loops whose clobber
is a conditional may-alias store through a varying pointer. Keep existing
PRE behavior for invariant-address clobbers, known aliasing, calls, ordered
memory operations, and loops with vectorization disabled or completed.
This is an opportunity heuristic, not a vectorization legality proof.
DeltaFile
+582-0llvm/test/Transforms/GVN/PRE/loop-load-pre-vectorization.ll
+55-0llvm/lib/Transforms/Scalar/GVN.cpp
+637-02 files

LLVM/project 8fe3c12 — clang/test/OpenMP structured-bindings-codegen.cpp parallel_master_taskloop_simd_firstprivate_codegen.cpp

[OpenMP] Preserve host capture lifetimes in frontend lowering

Mark captured alloca/global storage nofreeobj when Clang emits a synchronous
host parallel call. This preserves lifetime across outlining without claiming
that escaped capture slots are noalias or immutable, and without extending the
lifetime guarantee to pointers loaded from those slots.

Mark OpenMPIRBuilder's fresh host capture aggregate noalias and nofreeobj.
This covers the lowering path used by Flang and Clang's IRBuilder mode.

Replace callback Attributor seeding with frontend and translation tests,
including escaped captures, heap references, firstprivate pointers, debug
wrappers, serialized regions, and optimized load hoisting with OpenMPOpt
disabled. Refresh the affected parameter-attribute checks.
DeltaFile
+1,897-1,897clang/test/OpenMP/task_codegen.cpp
+527-527clang/test/OpenMP/parallel_master_taskloop_simd_codegen.cpp
+286-286clang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_codegen.cpp
+283-283clang/test/OpenMP/parallel_codegen.cpp
+235-235clang/test/OpenMP/parallel_master_taskloop_simd_firstprivate_codegen.cpp
+221-221clang/test/OpenMP/structured-bindings-codegen.cpp
+3,449-3,44979 files not shown
+5,573-5,31285 files