LLVM/project ab39c49llvm/lib/Target/X86 X86InstrInfo.cpp X86InstrInfo.h, llvm/test/CodeGen/X86/apx optimize-compare-multipred.ll optimize-compare-multipred.mir

[X86][APX] Reuse EFLAGS across multi-predecessor blocks via NF in optimizeCompareInstr (#208184)

Extend optimizeCompareInstr to reuse EFLAGS produced in predecessor
blocks (including via NF variants) when a compare is redundant, covering
multi-predecessor, dominating, and cyclic CFGs. Share the NF-clobber
removal helper with FlagsCopyLowering, correctly handle swapped and
immediate-adjusted flag reuse, and simplify EFLAGS live-in marking.

Adds MIR tests exercising multi-predecessor reuse over cyclic and
dominating CFGs, including a multi-level idom walk.

Assisted-By: Claude Opus 4.8
DeltaFile
+483-0llvm/test/CodeGen/X86/apx/optimize-compare-multipred.ll
+354-0llvm/test/CodeGen/X86/apx/optimize-compare-multipred.mir
+153-18llvm/lib/Target/X86/X86InstrInfo.cpp
+28-0llvm/lib/Target/X86/X86InstrInfo.h
+10-12llvm/test/CodeGen/X86/apx/add.ll
+1-10llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+1,029-401 files not shown
+1,030-437 files

LLVM/project 5c7dc8elibcxx/test/libcxx/ranges/range.adaptors/range.enumerate nodiscard.verify.cpp

[libc++][ranges] Add missing test cases for `[[nodiscard]]` tests in `enumerate_view` (#209289)

Addresses missing `[[nodiscard]]` test cases for
`std::views::enumerate`.

---------

Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+16-3libcxx/test/libcxx/ranges/range.adaptors/range.enumerate/nodiscard.verify.cpp
+16-31 files

LLVM/project 4b4d4a6llvm/test/Transforms/SLPVectorizer/AArch64 masked-div-rem-non-pow2.ll

[SLP][NFC]Add a test for potential masked div/rem ops, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/210593
DeltaFile
+184-0llvm/test/Transforms/SLPVectorizer/AArch64/masked-div-rem-non-pow2.ll
+184-01 files

LLVM/project cd99637mlir/lib/Dialect/Bufferization/Transforms BufferDeallocationSimplification.cpp, mlir/test/Dialect/Bufferization/Transforms buffer-deallocation-simplification.mlir

[mlir][bufferization] Fix stale BufferOriginAnalysis in BufferDeallocationSimplification (#210105)

Fixes #205228

This change fixes a use-after-free bug in the
BufferDeallocationSimplification pipeline caused by the greedy pattern
rewriter deleting operation tracked by the BufferOriginAnalysis.
BufferViewFlowAnalysis (internally used by BufferOriginAnalysis) creates
the dependencies map once during initialization. In this specific case,
the folder removed the `memref.cast` ops making later uses a
use-after-free bug.

Below is the snippet of running the pass using
`-debug-only=greedy-rewriter`. It erases a `memref.cast` and crashes in
RemoveDeallocMemrefsContainedInRetained.

```
...
[greedy-rewriter:1] //===-------------------------------------------===//

    [20 lines not shown]
DeltaFile
+29-0mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation-simplification.mlir
+14-2mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocationSimplification.cpp
+43-22 files

LLVM/project f25b3f6llvm/test/Analysis/LoopAccessAnalysis non-affine-monotonic-bounds.ll, llvm/test/Transforms/LoopVectorize non-affine-monotonic-bounds.ll

[LAA,LV] Add tests for non-affine monotonic pointer bounds (NFC). (#210544)

Add test cases with non-affine monotonic pointer bounds, like for
example when using std::bitset.

Initial sets of tests for
https://github.com/llvm/llvm-project/issues/207882.
DeltaFile
+391-0llvm/test/Analysis/LoopAccessAnalysis/non-affine-monotonic-bounds.ll
+226-0llvm/test/Transforms/LoopVectorize/non-affine-monotonic-bounds.ll
+150-0llvm/test/Transforms/LoopVectorize/AArch64/non-affine-monotonic-bounds.ll
+767-03 files

LLVM/project 5e1873aflang/lib/Parser openmp-parsers.cpp, llvm/include/llvm/Frontend/OpenMP OMP.h

[OpenMP] Add constexpr enum ranges for all clauses and all directives (#210406)

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
DeltaFile
+9-0llvm/include/llvm/Frontend/OpenMP/OMP.h
+2-5flang/lib/Parser/openmp-parsers.cpp
+2-4llvm/unittests/Frontend/OpenMPDirectiveNameParserTest.cpp
+2-4llvm/lib/Frontend/OpenMP/OMP.cpp
+15-134 files

LLVM/project 1d55a81clang/lib/Basic/Targets X86.cpp, clang/test/CodeGen attr-target-x86.c attr-target-mv.c

[X86] Support apxf in attribute target (#184078)

As in title. This adds support for using apxf in attribute target.
Individual features are not supported for FMV but are supported for
enabling a feature for the function

Patch done with usage of Claude Code.
DeltaFile
+55-0clang/test/CodeGen/attr-target-x86.c
+16-0clang/test/Sema/attr-target.c
+15-0clang/test/Sema/attr-target-mv.c
+9-0clang/lib/Basic/Targets/X86.cpp
+7-0clang/test/CodeGen/attr-target-mv.c
+2-2llvm/include/llvm/TargetParser/X86TargetParser.def
+104-26 files

LLVM/project 5cae63bpolly/test/IstAstInfo AstGenComputeOut.ll

[Polly][test] Add missing REQUIRES line (#210578)

The test was added by #201859. It's test uses --debug-only which
requires an LLVM_ENABLE_ASSERTIONS-build
DeltaFile
+2-0polly/test/IstAstInfo/AstGenComputeOut.ll
+2-01 files

LLVM/project 8042e61llvm/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/test/Transforms/InstCombine trunc.ll

[InstCombine] Fold trunc nuw/nsw (shr exact %x, %y) to i1 -> icmp ne %x, 0 (#210499)

Proof: https://alive2.llvm.org/ce/z/de6gru
DeltaFile
+108-0llvm/test/Transforms/InstCombine/trunc.ll
+5-1llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+113-12 files

LLVM/project ee62806clang/include/clang/AST OpenMPClause.h, clang/lib/Parse ParseOpenMP.cpp

[Clang][OpenMP] Add parsing/sema for dims modifier in num_teams and thread_limit (#206412)

Add parsing and sema support for `dims` modifier (OpenMP 6.1) in `num_teams` and
`thread_limit` clauses. Example:

```cpp
constexpr int N = 2;
#pragma omp teams num_teams(dims(3): x, y, z) thread_limit(dims(N): a, b)
{ ... }
```
DeltaFile
+231-78clang/lib/Sema/SemaOpenMP.cpp
+222-0clang/test/OpenMP/dims_modifier_messages.cpp
+68-21clang/lib/Parse/ParseOpenMP.cpp
+72-10clang/include/clang/AST/OpenMPClause.h
+40-0clang/test/OpenMP/dims_modifier_ast_print.cpp
+23-11clang/lib/Sema/TreeTransform.h
+656-12017 files not shown
+782-16223 files

LLVM/project 4a1c004llvm/include/llvm/MC MCSchedule.h, llvm/test/TableGen CompressWriteLatencyEntry.td

[MC] Pack scheduling class entry counts (#202649)

Generated scheduling classes currently use at most 20 write-resource
entries and 35 write-latency entries, while read-advance counts reach
504. Narrow the two write counts to `uint8_t`, order the three table
indices before the three counts, and emit target-specific compile-time
bounds assertions in generated subtarget source.

This reduces `sizeof(MCSchedClassDesc)` from 14 to 12 bytes in release
builds and from 20 to 16 bytes with debug fields. Fully stripped arm64
`llvm-mca` decreases by 544,896 bytes (1.49%), and the stripped
all-tools multicall binary decreases by 528,376 bytes (0.368%).

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.
DeltaFile
+20-6llvm/utils/TableGen/SubtargetEmitter.cpp
+12-3llvm/include/llvm/MC/MCSchedule.h
+6-3llvm/test/TableGen/CompressWriteLatencyEntry.td
+38-123 files

LLVM/project d4a08d3clang/test/Analysis/Scalable/TypeConstrainedPointers unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp unsafe-buffer-reachable-excludes-type-constrained-main.cpp

fix tests
DeltaFile
+23-9clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp
+12-1clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+35-102 files

LLVM/project f3528f8clang/test/CodeGenCoroutines gh188230-coro-await-elidable-suspend-never-final.cpp, llvm/include/llvm/Transforms/Coroutines CoroShape.h

[Coroutines] Use destroy slot for CoroElide resume fallthrough

Fixes https://github.com/llvm/llvm-project/issues/188230

A switch coroutine with a CoroElide noalloc variant uses the frame destroy slot as a runtime discriminator: heap-allocated frames store the destroy clone, while allocation-elided frames store the cleanup clone. Its resume clone can reach a fallthrough coro.end after the final suspend.

The coroutine body can invoke a continuation before reaching that coro.end. A suspend_never continuation can complete and free its frame before control returns. When the callee frame was elided into that caller allocation, loading the destroy slot at coro.end reads freed storage, which AddressSanitizer reports as a use-after-free.

Load and cache the destroy function in the switch-resume entry block before executing the resume body, then tail-call the cached value at fallthrough coro.end. The cache retains the frame slot as the allocation discriminator without dereferencing an elided frame after the continuation returns.

Add a C++ CodeGen regression for the original suspend_never final-suspend shape and update CoroSplit tests to require the entry load.

Assisted-By: Codex GPT 5.5
DeltaFile
+83-0llvm/test/Transforms/Coroutines/coro-split-resume-fallthrough-destroy-slot.ll
+76-0clang/test/CodeGenCoroutines/gh188230-coro-await-elidable-suspend-never-final.cpp
+46-6llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+4-1llvm/test/Transforms/Coroutines/coro-split-00.ll
+4-1llvm/test/Transforms/Coroutines/coro-split-addrspace.ll
+1-0llvm/include/llvm/Transforms/Coroutines/CoroShape.h
+214-81 files not shown
+215-87 files

LLVM/project f988efbllvm/lib/Target/AMDGPU AMDGPUTargetMachine.cpp, llvm/test/CodeGen/AMDGPU print-pipeline-passes.ll

[AMDGPU] Run early-cse<memssa> at the end of the full-LTO pipeline (#208461)

The regular (non-LTO) and ThinLTO function simplification pipelines run
an
EarlyCSE-with-MemorySSA pass near the start of the function pass
sequence, but
the full-LTO postlink pipeline does not. Without it, a redundant
load/store
round-trip can survive all the way to codegen; the later GVN/DSE in the
LTO
pipeline do not catch this particular pattern. 
    
Rather than touch the target-independent LTO pipeline, register
early-cse<memssa> through the AMDGPU FullLinkTimeOptimizationLast
extension
point, so it runs at the end of the full-LTO middle-end (before codegen)
only
for AMDGPU.
    
    Assisted-by: Claude Opus
DeltaFile
+7-0llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+1-3llvm/test/Transforms/PhaseOrdering/AMDGPU/infer-address-space.ll
+2-0llvm/test/CodeGen/AMDGPU/print-pipeline-passes.ll
+10-33 files

LLVM/project 7908826polly/include/polly DependenceInfo.h, polly/lib/Analysis DependenceInfo.cpp

[Polly] Guard ISL ast gen compute out (#201859)

Bounds the maximum ISL operations allowed for ISL AST Generation.

Fixes: https://github.com/llvm/llvm-project/issues/201801
DeltaFile
+130-0polly/test/IstAstInfo/AstGenComputeOut.ll
+34-27polly/lib/Analysis/DependenceInfo.cpp
+35-13polly/lib/CodeGen/IslAst.cpp
+7-5polly/include/polly/DependenceInfo.h
+206-454 files

LLVM/project c216b84clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp, clang/test/Analysis/Scalable/TypeConstrainedPointers unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp unsafe-buffer-reachable-excludes-type-constrained-main.cpp

address comments
DeltaFile
+48-29clang/lib/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+44-20clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-new-delete.cpp
+13-4clang/test/Analysis/Scalable/TypeConstrainedPointers/unsafe-buffer-reachable-excludes-type-constrained-main.cpp
+105-533 files

LLVM/project 446a84aopenmp/runtime/src kmp_i18n.cpp

[OpenMP] Simplify GNU strerror_r check for Android (#148990)

Android 6 is the baseline so simplify the Android check.
DeltaFile
+1-3openmp/runtime/src/kmp_i18n.cpp
+1-31 files

LLVM/project 8043ceblibc/cmake/modules LLVMLibCCompileOptionRules.cmake

[libc] Omit -fpie from the full build (#208343)

We shouldn't unconditionally set -fpie, users should be able to control
this with CMAKE_POSITION_INDEPENDENT_CODE.
DeltaFile
+0-2libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+0-21 files

LLVM/project 81ed4d0llvm/include/llvm/ADT GenericUniformityImpl.h

[UniformityAnalysis] Replace DenseMap with SmallVector indexed by block number. NFC (#210564)
DeltaFile
+14-6llvm/include/llvm/ADT/GenericUniformityImpl.h
+14-61 files

LLVM/project f05a649libc/shared/math lgammaf16.h, libc/src/__support/math lgammaf16.h

[libc][math] Implement half precision lgamma function (#192834)

The implementation uses three distinct paths based on $|x|$:

- Small ($|x| < 0.66$): Fits a degree-12 Chebyshev for $h(t) =
\frac{\text{lgamma}(t) + \log(t)}{t}$, recovering $\text{lgamma}(t) = t
\cdot h - \log(t)$.

- Medium ($|x| \in [0.66, 3.37]$): Fits a degree-20 Chebyshev for $g(t)
= \frac{\text{lgamma}(t)}{(t-1)(t-2)}$
- Stirling ($|x| > 3.37$): Uses $(x-0.5) \cdot \log(x) - x +
\frac{\log(2\pi)}{2}$ plus 1/2/4/8-term Bernoulli corrections by
sub-range.


Special cases: NaN, +/-Inf -> +Inf, +/-0 pole, negative integer pole,
lgamma(1) = lgamma(2) = 0 exactly, overflow for large positive x.

Exhaustive tests pass in all 4 rounding modes.

    [6 lines not shown]
DeltaFile
+308-0libc/src/__support/math/lgammaf16.h
+61-0libc/test/src/math/smoke/lgammaf16_test.cpp
+42-0libc/test/src/math/lgammaf16_test.cpp
+29-0libc/shared/math/lgammaf16.h
+23-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+21-0libc/src/math/lgammaf16.h
+484-024 files not shown
+590-130 files

LLVM/project 617e4f5clang/lib/Interpreter Interpreter.cpp

[Clang][Interpreter] Don't pass -fPIC on MSVC (#210507)
DeltaFile
+8-2clang/lib/Interpreter/Interpreter.cpp
+8-21 files

LLVM/project 14bf60dllvm/include/llvm/ADT GenericCycleImpl.h

[CycleInfo] Deduplicate getExitBlocks with a set. NFC (#210557)

Fix the O(exit_blocks^2) hazard.
DeltaFile
+6-20llvm/include/llvm/ADT/GenericCycleImpl.h
+6-201 files

LLVM/project 84b9da6.github/workflows/containers/libc Dockerfile

[Github] Install `llvm-tools` in libc container (#210414)

Currently, the libc container doesn't contain `llvm-tools`. we need to
use them in #200196 because we are not able to use `llvm-lit` without
building clang from source
DeltaFile
+6-0.github/workflows/containers/libc/Dockerfile
+6-01 files

LLVM/project 70c26a9llvm/docs NVPTXUsage.rst NVPTXUsage.md, llvm/test/CodeGen/NVPTX atomicrmw-sm60.ll atomicrmw-sm70.ll

fix

Created using spr 1.3.7
DeltaFile
+0-4,767llvm/docs/NVPTXUsage.rst
+2,949-1,487llvm/test/CodeGen/NVPTX/atomicrmw-sm60.ll
+2,871-1,461llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
+4,253-0llvm/docs/NVPTXUsage.md
+1,635-849llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
+1,267-0llvm/test/CodeGen/RISCV/GlobalISel/atomicrmw-xchg.ll
+12,975-8,564784 files not shown
+48,700-26,645790 files

LLVM/project e974403llvm/docs NVPTXUsage.rst NVPTXUsage.md, llvm/test/CodeGen/NVPTX atomicrmw-sm60.ll atomicrmw-sm70.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-4,767llvm/docs/NVPTXUsage.rst
+2,949-1,487llvm/test/CodeGen/NVPTX/atomicrmw-sm60.ll
+2,871-1,461llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
+4,253-0llvm/docs/NVPTXUsage.md
+1,635-849llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
+1,267-0llvm/test/CodeGen/RISCV/GlobalISel/atomicrmw-xchg.ll
+12,975-8,564783 files not shown
+48,699-26,644789 files

LLVM/project 0e3d17allvm/lib/Target/WebAssembly WebAssemblyReplacePhysRegs.cpp WebAssembly.h

[WebAssembly] Port WebAssemblyReplacePhysRegsPass

Standard NewPM pass porting.

Reviewers: dschuff, aheejin, sbc100

Pull Request: https://github.com/llvm/llvm-project/pull/209957
DeltaFile
+26-10llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp
+9-2llvm/lib/Target/WebAssembly/WebAssembly.h
+2-2llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+1-1llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+1-0llvm/lib/Target/WebAssembly/WebAssemblyPassRegistry.def
+39-155 files

LLVM/project add2af6llvm/docs NVPTXUsage.rst NVPTXUsage.md, llvm/test/CodeGen/NVPTX atomicrmw-sm60.ll atomicrmw-sm70.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-4,767llvm/docs/NVPTXUsage.rst
+2,949-1,487llvm/test/CodeGen/NVPTX/atomicrmw-sm60.ll
+2,871-1,461llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
+4,253-0llvm/docs/NVPTXUsage.md
+1,635-849llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
+1,267-0llvm/test/CodeGen/RISCV/GlobalISel/atomicrmw-xchg.ll
+12,975-8,564783 files not shown
+48,699-26,644789 files

LLVM/project f5c4f39llvm/lib/Target/WebAssembly WebAssemblyLateEHPrepare.cpp WebAssembly.h

[WebAssembly] Port WebAssemblyLateEHPreparePass

Standard NewPM pass porting.

Reviewers: aheejin, sbc100, dschuff

Pull Request: https://github.com/llvm/llvm-project/pull/209956
DeltaFile
+46-21llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
+10-2llvm/lib/Target/WebAssembly/WebAssembly.h
+2-3llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+2-2llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+1-0llvm/lib/Target/WebAssembly/WebAssemblyPassRegistry.def
+61-285 files

LLVM/project 1bfeb2fllvm/docs NVPTXUsage.rst NVPTXUsage.md, llvm/test/CodeGen/NVPTX atomicrmw-sm60.ll atomicrmw-sm70.ll

rebase

Created using spr 1.3.5-bogner
DeltaFile
+0-4,767llvm/docs/NVPTXUsage.rst
+2,949-1,487llvm/test/CodeGen/NVPTX/atomicrmw-sm60.ll
+2,871-1,461llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
+4,253-0llvm/docs/NVPTXUsage.md
+3,624-0mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
+1,635-849llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
+15,332-8,5644,684 files not shown
+126,127-64,3784,690 files

LLVM/project b9ebe54llvm/docs NVPTXUsage.rst NVPTXUsage.md, llvm/test/CodeGen/NVPTX atomicrmw-sm60.ll atomicrmw-sm70.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.5-bogner

[skip ci]
DeltaFile
+0-4,767llvm/docs/NVPTXUsage.rst
+2,949-1,487llvm/test/CodeGen/NVPTX/atomicrmw-sm60.ll
+2,871-1,461llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
+4,253-0llvm/docs/NVPTXUsage.md
+3,624-0mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
+1,635-849llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
+15,332-8,5644,684 files not shown
+126,127-64,3784,690 files