LLVM/project 6ea4377libcxx/test/std/numerics/numeric.ops/numeric.ops.sat saturate_cast.pass.cpp saturating_cast.pass.cpp, llvm/lib/Target/AMDGPU GCNSchedStrategy.cpp

Rebase

Created using spr 1.3.7
DeltaFile
+2,253-17llvm/test/CodeGen/AMDGPU/freeze.ll
+0-394libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp
+394-0libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_cast.pass.cpp
+385-0llvm/test/CodeGen/X86/apx/pr191368.ll
+157-138llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+140-150llvm/test/CodeGen/AMDGPU/load-global-i16.ll
+3,329-699234 files not shown
+8,456-3,789240 files

LLVM/project 7c872e9llvm/test/Transforms/SLPVectorizer/X86 operand-reorder-with-copyables.ll

[SLP][NFC]Add a test with the reordering of the RHS/LHS operands for copyables, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191730
DeltaFile
+140-0llvm/test/Transforms/SLPVectorizer/X86/operand-reorder-with-copyables.ll
+140-01 files

LLVM/project a7b4e7bllvm/lib/Transforms/Utils CallGraphUpdater.cpp, llvm/test/Transforms/Inline inline-history-dead-function.ll

[CallGraphUpdater] Replace dead function in metadata with null instead of poison

Assisted-by: claude-4.6-opus
DeltaFile
+29-0llvm/test/Transforms/Inline/inline-history-dead-function.ll
+6-1llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+35-12 files

LLVM/project 47e77fallvm/include/llvm/Analysis ValueTracking.h, llvm/lib/Analysis ValueTracking.cpp BasicAliasAnalysis.cpp

ValueTracking: Use SimplifyQuery for computeKnownConstantRange

Does introduce new context passing in a few of the updated contexts.
DeltaFile
+23-28llvm/lib/Analysis/ValueTracking.cpp
+20-20llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+18-10llvm/unittests/Analysis/ValueTrackingTest.cpp
+4-3llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+4-3llvm/lib/Analysis/BasicAliasAnalysis.cpp
+1-4llvm/include/llvm/Analysis/ValueTracking.h
+70-684 files not shown
+79-7410 files

LLVM/project 0ab10d1llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine known-range-frexp-exp.ll

ValueTracking: Handle frexp exp in computeKnownConstantRange (#191282)
DeltaFile
+136-0llvm/test/Transforms/InstCombine/known-range-frexp-exp.ll
+29-1llvm/lib/Analysis/ValueTracking.cpp
+165-12 files

LLVM/project 183660dllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 phi-operand-gathered-loads.ll

[SLP] Fix GEP cost computation for load vectorization cost estimates

Pass Instruction::Load instead of Instruction::GetElementPtr to
getGEPCosts in isMaskedLoadCompress and CheckForShuffledLoads.
These call sites estimate costs for wide contiguous loads and sub-vector
load patterns, not for masked gather pointer vector formation. Using
Instruction::GetElementPtr incorrectly triggered the gather-style cost
path, which computes vector GEP formation costs. Since the call sites
already add scalarization overhead for pointer vector building
separately, this led to double-counting of pointer costs and inaccurate
vectorization decisions.

Reviewers: hiraditya, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/191728
DeltaFile
+16-6llvm/test/Transforms/SLPVectorizer/X86/phi-operand-gathered-loads.ll
+5-7llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+21-132 files

LLVM/project 6c77981llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3 KaleidoscopeJIT.h, llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4 KaleidoscopeJIT.h

[ORC] Move MemoryAccess ownership out of ExecutorProcessControl. (#191715)

Similar to the DylibManager change in e55fb5de0f9, this removes an
unnecessary coupling between ExecutorProcessControl and MemoryAccess,
allowing clients to select MemoryAccess implementations independently.

To simplify the transition, the
ExecutorProcessControl::createDefaultMemoryAccess method will return an
instance of whatever MemoryAccess the ExecutorProcessControl
implementation had been using previously.
DeltaFile
+21-31llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
+15-13llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
+11-11llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
+12-2llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
+12-2llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
+4-9llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
+75-6812 files not shown
+138-9818 files

LLVM/project 8113b98llvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine icmp-umax-notx.ll

[InstCombine] Missed fold: umax(x, C) > ~x -> x < 0 (#189396)

fix : https://github.com/llvm/llvm-project/issues/187648

Fix the missed optimization for 
`icmp ugt (umax(x, C)), ~x` and `icmp ult (umax(x, C)), ~x`

Alive2 proof:
https://alive2.llvm.org/ce/z/dDNJ2m
https://alive2.llvm.org/ce/z/X633UX
DeltaFile
+43-0llvm/test/Transforms/InstCombine/icmp-umax-notx.ll
+22-1llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+65-12 files

LLVM/project 25691e3llvm/include/llvm/Analysis ValueTracking.h, llvm/lib/Analysis ValueTracking.cpp BasicAliasAnalysis.cpp

ValueTracking: Use SimplifyQuery for computeKnownConstantRange

Does introduce new context passing in a few of the updated contexts.
DeltaFile
+23-28llvm/lib/Analysis/ValueTracking.cpp
+20-20llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+18-10llvm/unittests/Analysis/ValueTrackingTest.cpp
+5-3llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+4-2llvm/lib/Analysis/BasicAliasAnalysis.cpp
+1-4llvm/include/llvm/Analysis/ValueTracking.h
+71-674 files not shown
+81-7410 files

LLVM/project 90d3515llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 phi-operand-gathered-loads.ll

Revert "[SLP] Fix GEP cost computation for load vectorization cost estimates"

This reverts commit 778c0fb1dbf1803f8f250fd7feb935095e91e57b to fix
buildbots https://lab.llvm.org/buildbot/#/builders/213/builds/2725, https://lab.llvm.org/buildbot/#/builders/212/builds/2876

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191725
DeltaFile
+6-16llvm/test/Transforms/SLPVectorizer/X86/phi-operand-gathered-loads.ll
+6-5llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-212 files

LLVM/project 45ac339llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine known-range-frexp-exp.ll

ValueTracking: Handle frexp exp in computeKnownConstantRange

Compute the bounds based on the known exponent range.
Only handles IEEE cases since I don't see an easy way to
get the bounds in general.

Test uses instcombine instead of checking for the range
attribute, since apparently attributor doesn't handle introducing
range attributes from computeConstantRange.
DeltaFile
+136-0llvm/test/Transforms/InstCombine/known-range-frexp-exp.ll
+29-1llvm/lib/Analysis/ValueTracking.cpp
+165-12 files

LLVM/project 1d1208bllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 copyable-phi-used-non-copyable.ll

[SLP]Fix dominance failure when value is copyable in one PHI entry but non-copyable in another

When a value is treated as a copyable element in one tree entry and as a
non-copyable element in another, both feeding into PHI nodes, the
scheduler could produce vectorized IR where an instruction does not
dominate all its uses. Bail out of scheduling in tryScheduleBundle when
this conflict is detected to prevent generating broken modules.
Fixes #191714

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191724
DeltaFile
+53-0llvm/test/Transforms/SLPVectorizer/X86/copyable-phi-used-non-copyable.ll
+12-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+65-02 files

LLVM/project e9cd683llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv fixed-vectors-shuffle-vslide1up-bf16.ll fixed-vectors-shuffle-vslide1down-bf16.ll

[RISCV] Enable vfslide1up/down for bf16 shuffles with Zvfbfa. (#191608)
DeltaFile
+49-0llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up-bf16.ll
+45-0llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1down-bf16.ll
+4-30llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up.ll
+4-28llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1down.ll
+2-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+104-595 files

LLVM/project 38e9650llvm/lib/Transforms/Utils CallGraphUpdater.cpp, llvm/test/Transforms/Inline inline-history-dead-function.ll

[CallGraphUpdater] Replace dead function in metadata with null instead of poison
DeltaFile
+29-0llvm/test/Transforms/Inline/inline-history-dead-function.ll
+6-1llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+35-12 files

LLVM/project 636dbc8clang/lib/AST/ByteCode Interp.h Char.h

[clang][bytecode] Support different integral types (e.g. addresses) (#185028)

This is an alternative approach to
https://github.com/llvm/llvm-project/pull/169769.

We increase the size of the old `Integral<Bits, Signed>` to 24 bytes (on
a 64 bit system) and introduce a new `Char<Signed>` that's used for the
old `PT_Sint8` and `PT_Uint8` primitive types.

The old approach did not work out in the end because we need to be able
to do arithmetic (but essentially just `+` and `-`) on the offsets of
such integers-that-are-actually-pointers.

c-t-t-:

https://llvm-compile-time-tracker.com/compare.php?from=723d5cb11b2a64e4f11032f24967702e52f822bc&to=16dc90efebbf52e381c7655131b2fb74c307cc42&stat=instructions:u
DeltaFile
+246-17clang/lib/AST/ByteCode/Interp.h
+225-0clang/lib/AST/ByteCode/Char.h
+148-52clang/lib/AST/ByteCode/Integral.h
+27-34clang/lib/AST/ByteCode/InterpBuiltin.cpp
+45-0clang/lib/AST/ByteCode/Primitives.h
+23-11clang/lib/AST/ByteCode/Interp.cpp
+714-11434 files not shown
+905-14140 files

LLVM/project 0dec824flang/lib/Optimizer/Transforms MIFOpConversion.cpp

Fix typo in comment for multi-image environment
DeltaFile
+1-1flang/lib/Optimizer/Transforms/MIFOpConversion.cpp
+1-11 files

LLVM/project 5c5b8eaflang/lib/Semantics openmp-utils.cpp

format
DeltaFile
+2-1flang/lib/Semantics/openmp-utils.cpp
+2-11 files

LLVM/project bc23293flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics openmp-utils.cpp resolve-directives.cpp

[flang][OpenMP] Identify DO loops affected by loop-associated construct

This is to identify iteration variables of DO loops affected by an OpenMP
loop construct. These variables are privatized as per data-sharing rules.
DeltaFile
+91-0flang/lib/Semantics/openmp-utils.cpp
+33-36flang/lib/Semantics/resolve-directives.cpp
+27-0flang/test/Semantics/OpenMP/affected-loops.f90
+7-0flang/include/flang/Semantics/openmp-utils.h
+158-364 files

LLVM/project b444d1dllvm/lib/Target/AMDGPU GCNSchedStrategy.cpp GCNSchedStrategy.h, llvm/test/CodeGen/AMDGPU sched_mfma_rewrite_copies.mir misched-remat-revert.ll

Revert "[AMDGPU][Scheduler] Use MIR-level rematerializer in rematerialization stage (#189491)"

This reverts commit be62f270fd01e8c526f1e37df74ff1061e360dab, it breaks
the compilation!!!

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191717
DeltaFile
+551-551llvm/test/CodeGen/AMDGPU/sched_mfma_rewrite_copies.mir
+577-0llvm/test/CodeGen/AMDGPU/misched-remat-revert.ll
+294-108llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+73-49llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
+36-36llvm/test/CodeGen/AMDGPU/sched_mfma_rewrite_cost.mir
+19-19llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats-attr.mir
+1,550-7632 files not shown
+1,573-7868 files

LLVM/project 778c0fbllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 phi-operand-gathered-loads.ll

[SLP] Fix GEP cost computation for load vectorization cost estimates

Pass Instruction::Load instead of Instruction::GetElementPtr to
getGEPCosts in isMaskedLoadCompress and CheckForShuffledLoads.
These call sites estimate costs for wide contiguous loads and sub-vector
load patterns, not for masked gather pointer vector formation. Using
Instruction::GetElementPtr incorrectly triggered the gather-style cost
path, which computes vector GEP formation costs. Since the call sites
already add scalarization overhead for pointer vector building
separately, this led to double-counting of pointer costs and inaccurate
vectorization decisions.

Reviewers: hiraditya, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/191620
DeltaFile
+16-6llvm/test/Transforms/SLPVectorizer/X86/phi-operand-gathered-loads.ll
+5-6llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+21-122 files

LLVM/project b844cc8libcxx/docs/Status Cxx23Issues.csv, libcxx/include/__ranges iota_view.h

[libc++][ranges] LWG3610: `iota_view::size` sometimes rejects integer-class types (#155169)

Fixes #104948

# References

- https://wg21.link/range.iota.view
- https://wg21.link/range.iota.view#17
- https://wg21.link/LWG3610

---------

Co-authored-by: A. Jiang <de34 at live.cn>
DeltaFile
+16-0libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp
+1-1libcxx/include/__ranges/iota_view.h
+1-1libcxx/docs/Status/Cxx23Issues.csv
+18-23 files

LLVM/project 48ad929libcxx/test/std/numerics/numeric.ops/numeric.ops.sat saturating_cast.pass.cpp saturate_cast.pass.cpp

[libc++][numeric] P4052R0: Renaming saturation arithmetic functions (#189574)

Implements P4052R0.

Also renames:
- the internal names for consistency.
- test files (no changes to the contents but the function names).

Fixes: #189589

---------

Co-authored-by: A. Jiang <de34 at live.cn>
DeltaFile
+394-0libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_cast.pass.cpp
+0-394libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp
+177-0libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_mul.pass.cpp
+0-177libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/mul_sat.pass.cpp
+0-171libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/add_sat.pass.cpp
+171-0libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_add.pass.cpp
+742-74227 files not shown
+1,572-1,57133 files

LLVM/project be62f27llvm/lib/Target/AMDGPU GCNSchedStrategy.cpp GCNSchedStrategy.h, llvm/test/CodeGen/AMDGPU sched_mfma_rewrite_copies.mir misched-remat-revert.ll

[AMDGPU][Scheduler] Use MIR-level rematerializer in rematerialization stage (#189491)

This makes the scheduler's rematerialization stage use the
target-independent rematerializer. Previously duplicate logic is
deleted, and restrictions are put in place in the stage so that the same
constraints as before apply on rematerializable registers (as the
rematerializer is able to expose many more rematerialization
opportunities than what the stage can track at the moment). Consequently
it is not expected that this change improves performance overall, but it
is a first step toward being able to use the rematerializer's more
advanced capabilities during scheduling.

This is *not* a NFC for 2 reasons.

- Score equalities between two rematerialization candidates with
otherwise equivalent score are decided by their corresponding register's
index handle in the rematerializer (previously the pointer to their
state object's value). This is determined by the rematerializer's
register collection order, which is different from the stage's old

    [12 lines not shown]
DeltaFile
+551-551llvm/test/CodeGen/AMDGPU/sched_mfma_rewrite_copies.mir
+0-577llvm/test/CodeGen/AMDGPU/misched-remat-revert.ll
+108-294llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+49-73llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
+36-36llvm/test/CodeGen/AMDGPU/sched_mfma_rewrite_cost.mir
+19-19llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats-attr.mir
+763-1,5502 files not shown
+786-1,5738 files

LLVM/project 1244555flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics openmp-utils.cpp

[flang][OpenMP] Implement GetGeneratedNestDepthWithReason

For a loop-nest-generating construct this function returns the number of
loops in the generated loop nest.

A loop-nest-transformation construct can be thought as replacing N nested
loops with K nested loops, where
  N = GetAffectedNestDepthWithReason
  K = GetGeneratedNestDepthWithReason
DeltaFile
+67-24flang/lib/Semantics/openmp-utils.cpp
+5-0flang/include/flang/Semantics/openmp-utils.h
+72-242 files

LLVM/project b31d8bcllvm/include/llvm/ExecutionEngine/JITLink JITLink.h

[JITLink] Use NonOwningSymbolStringPtrs in ExternalSymbolsMap. (#191634)

SymbolStringPtr comparisons should be more efficient that string
comparisons. Fixes a FIXME.
DeltaFile
+16-11llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
+16-111 files

LLVM/project 9270a34llvm/test/tools/llvm-readobj/ELF packed-relocs-errors.s dynamic-tags.test, llvm/tools/llvm-readobj ELFDumper.cpp ObjDumper.cpp

[llvm-readobj][ELF] Use WrappedError to filter duplicates

Switch from StringError to WrappedError. Errors of the form "Prefix:
Error" can now be filtered out based on the underlying error while
preserving distinct prefixes, resulting in clearer llvm-readobj output.
DeltaFile
+204-192llvm/tools/llvm-readobj/ELFDumper.cpp
+16-13llvm/test/tools/llvm-readobj/ELF/packed-relocs-errors.s
+20-8llvm/tools/llvm-readobj/ObjDumper.cpp
+0-11llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
+4-7llvm/test/tools/llvm-readobj/ELF/program-headers.test
+0-7llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
+244-23811 files not shown
+249-25817 files

LLVM/project 0b016dcllvm/include/llvm/Object ELF.h, llvm/lib/Object ELF.cpp

[Object][ELF] Pass Error to WarningHandler

Warning consumers may need to handle errors based on their type. Pass
the Error object instead of a string representation to enable this. This
also brings WarningHandler in line with Support/WithColor.h.
DeltaFile
+22-23llvm/include/llvm/Object/ELF.h
+5-4llvm/tools/llvm-objdump/llvm-objdump.cpp
+4-3llvm/tools/llvm-readobj/ObjDumper.cpp
+2-2llvm/unittests/Object/ELFObjectFileTest.cpp
+2-2llvm/lib/Object/ELF.cpp
+2-2llvm/tools/llvm-readobj/ELFDumper.cpp
+37-362 files not shown
+39-388 files

LLVM/project 34c8339flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics openmp-utils.cpp

[flang][OpenMP] Update comments, NFC (#191709)

Some comments in openmp-utils.cpp became outdated after the code had
changed.
DeltaFile
+5-5flang/include/flang/Semantics/openmp-utils.h
+4-4flang/lib/Semantics/openmp-utils.cpp
+9-92 files

LLVM/project 4af3960llvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine fp-floor-ceil.ll

[InstCombine] Improve suboptimal simplification for more than one use in #190620 (#191702)

Address to
https://github.com/llvm/llvm-project/pull/190620#issuecomment-4229926121
DeltaFile
+26-0llvm/test/Transforms/InstCombine/fp-floor-ceil.ll
+1-1llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+27-12 files

LLVM/project 6911fafllvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine fneg.ll

[InstCombine] Fix FMF propagation in `foldFNegIntoConstant` (#191653)

Counterexamples for ninf and nsz: https://alive2.llvm.org/ce/z/7-Je_K
Closes https://github.com/llvm/llvm-project/issues/189729.
DeltaFile
+48-4llvm/test/Transforms/InstCombine/fneg.ll
+7-0llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+55-42 files