LLVM/project ff4c6fellvm/include/llvm/Analysis ScalarEvolution.h ScalarEvolutionExpressions.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Move NoWrapFlags definition outside SCEV scope, use for SCEVUse. (#190199)

The patch moves out of SCEV's scope so they can be re-used for SCEVUse.
SCEVUse gets an additional getNoWrapFlags helper that returns the union
of the expressions SCEV flags and the use-specific flags.

SCEVExpander has been updated to use this new helper.

In order to avoid other changes, the original names are exposed via
constexpr in SCEV. Not sure if there's a nicer way. One alternative
would be to define the enum in struct, and have SCEV inherit from it.

The patch also clarifies that the SCEVUse flags encode NUW/NSW, and
hides getInt, setInt, etc to avoid potential mis-use.

PR: https://github.com/llvm/llvm-project/pull/190199
DeltaFile
+105-72llvm/include/llvm/Analysis/ScalarEvolution.h
+22-27llvm/lib/Analysis/ScalarEvolution.cpp
+49-0llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp
+16-15llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+20-7llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
+1-2polly/test/CodeGen/non_affine_float_compare.ll
+213-1232 files not shown
+215-1258 files

LLVM/project 47cd798llvm/lib/Target/RISCV RISCVTargetTransformInfo.h, llvm/test/Transforms/LoopVectorize/RISCV conditional-scalar-assignment.ll conditional-scalar-assignment-fold-tail.ll

Revert "[LV] Enable scalable FindLast on RISCV." (#190463)

Reverts llvm/llvm-project#184931 since it crash llvm-test-suite.
https://lab.llvm.org/buildbot/#/builders/210/builds/9807
DeltaFile
+0-172llvm/test/Transforms/LoopVectorize/RISCV/conditional-scalar-assignment.ll
+0-129llvm/test/Transforms/LoopVectorize/RISCV/conditional-scalar-assignment-fold-tail.ll
+35-21llvm/test/Transforms/LoopVectorize/RISCV/select-cmp-reduction.ll
+0-1llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+35-3234 files

LLVM/project 7c60d08llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/AArch64 known-fpclass-splat-vector.ll

[DAG] computeKnownFPClass - add ISD::SPLAT_VECTOR handling (#189780)

Fixes #189481

Implement ISD::SPLAT_VECTOR in SelectionDAG::computeKnownFPClass to
correctly propagate floating-point properties from scalar operands to
vectors.

Added AArch64 and RISC-V test coverage
DeltaFile
+31-0llvm/test/CodeGen/RISCV/combine-is_fpclass.ll
+24-0llvm/test/CodeGen/AArch64/known-fpclass-splat-vector.ll
+4-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+59-03 files

LLVM/project ee40533llvm/include/llvm/IR DiagnosticInfo.h

DiagnosticInfo: Fix stack-use-after-scope in DiagnosticInfoStackSize (#190442)

The string literal "stack frame size" passed to the base class
constructor created a temporary Twine that was destroyed after
the base constructor completed, leaving a dangling reference.

Fix by storing the Twine as a member variable in the derived class,
ensuring it lives as long as the diagnostic object itself.

Fixes ASAN stack-use-after-scope error in
  Clang :: Misc/backend-stack-frame-diagnostics-fallback.cpp
  LLVM :: CodeGen/X86/2007-04-24-Huge-Stack.ll
  LLVM :: CodeGen/X86/huge-stack-offset.ll
  LLVM :: CodeGen/X86/huge-stack-offset2.ll
  LLVM :: CodeGen/X86/huge-stack.ll
  LLVM :: CodeGen/X86/large-displacements.ll
  LLVM :: CodeGen/X86/stack-clash-extra-huge.ll
  LLVM :: CodeGen/X86/warn-stack.ll
  LLVM :: CodeGen/X86/win64-stackprobe-overflow.ll
DeltaFile
+3-2llvm/include/llvm/IR/DiagnosticInfo.h
+3-21 files

LLVM/project a8ad2a7lldb/include/lldb lldb-defines.h, lldb/source/Interpreter Options.cpp

[lldb] Fix alias parsing with joined options (#190301)

Fixes a crash with the following alias, which I use for printing the
contents of pointer variables:

```
command alias vp v -P1
```

At some point in the recent-ish past, parsing this alias has started
crashing lldb. The problem is code that assumes the option and its value
are separate. This assumption causes an index past the end of a vector.

This fix changes `FindArgumentIndexForOption`. The function now returns
a pair of indexes, the first index is the option, the second index is
the index of the value. In the case of joined options like `-P1`, the
two indexes are the same.
DeltaFile
+27-16lldb/source/Interpreter/Options.cpp
+7-0lldb/test/Shell/Commands/command-alias-joined-arg.test
+1-0lldb/include/lldb/lldb-defines.h
+35-163 files

LLVM/project e6a0695llvm/lib/Target/RISCV RISCVTargetTransformInfo.h, llvm/test/Transforms/LoopVectorize/RISCV conditional-scalar-assignment.ll conditional-scalar-assignment-fold-tail.ll

Revert "[LV] Enable scalable FindLast on RISCV. (#184931)"

This reverts commit a955b3cabab66bba586fdd14f56ab251c50dfc05.
DeltaFile
+0-172llvm/test/Transforms/LoopVectorize/RISCV/conditional-scalar-assignment.ll
+0-129llvm/test/Transforms/LoopVectorize/RISCV/conditional-scalar-assignment-fold-tail.ll
+35-21llvm/test/Transforms/LoopVectorize/RISCV/select-cmp-reduction.ll
+0-1llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+35-3234 files

LLVM/project 230d757mlir/lib/Reducer OptReductionPass.cpp

[mlir][reducer] make opt-reduction pass clone topOp after check (NFC) (#189356)

To avoid potential memory leaks, this PR defers the ModuleOp cloning
until after the verification check. If the check fails, the
moduleVariant might not be properly deallocated(original
implementation), leading to a memory leak. Therefore, this PR ensures
that the clone operation is only performed after a successful check. It
is part of https://github.com/llvm/llvm-project/pull/189353.
DeltaFile
+1-2mlir/lib/Reducer/OptReductionPass.cpp
+1-21 files

LLVM/project fb3fadapolly/include/polly ScopBuilder.h, polly/lib/Analysis ScopBuilder.cpp

[Polly][NFC] Convert ScopBuilder::getPwAff() to isl++ (#190458)
DeltaFile
+18-11polly/lib/Analysis/ScopBuilder.cpp
+4-3polly/include/polly/ScopBuilder.h
+22-142 files

LLVM/project 5e0efc0llvm/include/llvm/CodeGenTypes LowLevelType.h, llvm/lib/CodeGen LowLevelTypeUtils.cpp

Reland "[GlobalISel][LLT] Introduce FPInfo for LLT (Enable bfloat, ppc128float and others in GlobalISel) (#155107)" (#188502)

This is a reland of https://github.com/llvm/llvm-project/pull/155107
along with a fix for old gcc builds.

This patch is reverted in
https://github.com/llvm/llvm-project/pull/188344 due to compilation
failures described in
https://github.com/llvm/llvm-project/pull/155107#issuecomment-4121292756

The fix to old gcc builds is to remove `constexpr` modifiers in the
original patch in 0721d8e7768c011b8cf2d4d223ca6eca3392b1f9
DeltaFile
+400-145llvm/include/llvm/CodeGenTypes/LowLevelType.h
+160-73llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+135-0llvm/unittests/CodeGen/GlobalISel/IRTranslatorBF16Test.cpp
+77-35llvm/lib/CodeGen/MIRParser/MIParser.cpp
+64-39llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
+69-25llvm/lib/CodeGen/LowLevelTypeUtils.cpp
+905-31748 files not shown
+1,300-48554 files

LLVM/project 47d8003polly/include/polly ScopInfo.h, polly/lib/Analysis ScopInfo.cpp ScopBuilder.cpp

[Polly][NFC] Use factory pattern (#190456)

To (theoretically) reduce coupling of Scop and ScopBuilder.
DeltaFile
+14-10polly/lib/Analysis/ScopInfo.cpp
+6-5polly/include/polly/ScopInfo.h
+2-2polly/lib/Analysis/ScopBuilder.cpp
+22-173 files

LLVM/project 6565e08lld/COFF Driver.cpp Config.h, lld/test/COFF discard-section.test

[lld][COFF] Add /discard-section option to discard input sections by name (#189542)

This provides a general mechanism similar to ELF linker scripts'
/DISCARD/ for COFF. Though the intention is to explicitly discard
.llvmbc and .llvmcmd sections. (See discussion in #150897, #188398
for more details.)
DeltaFile
+51-0lld/test/COFF/discard-section.test
+4-0lld/COFF/Driver.cpp
+3-0lld/COFF/Config.h
+3-0lld/COFF/InputFiles.cpp
+1-0lld/COFF/Options.td
+62-05 files

LLVM/project 948a647polly/include/polly ScopBuilder.h ScopInfo.h, polly/include/polly/Support SCEVAffinator.h

[Polly] Assumptions used to derive domain must not be pruned by that domain (#190436)

The code that emits the conditions for whether a statement is executed
by checking whether we are in the statement's domain may apply
assumptions (such as an integer truncation being reversible). Later code
then assumes that these assumptions are only relevent for then the
statement is executed, but actually it is used for determining whether
it is executed.

Break this circular reasoning by introducing an `IsInsideDomain` flag
that can be set when the domain has not been verified yet.

Fixes #190128

Thanks to @thapgua for the bug report
DeltaFile
+101-69polly/lib/Analysis/ScopBuilder.cpp
+71-0polly/test/ScopInfo/issue190128.ll
+27-6polly/include/polly/ScopBuilder.h
+17-2polly/include/polly/Support/SCEVAffinator.h
+7-3polly/test/ScopInfo/zero_ext_of_truncate_2.ll
+8-1polly/include/polly/ScopInfo.h
+231-814 files not shown
+244-8910 files

LLVM/project 4066590clang/lib/Driver Driver.cpp, clang/test/Driver hip-toolchain-no-rdc.hip

clang: Stop assuming one toolchain covers all GPUArchs (#190369)
DeltaFile
+27-23clang/lib/Driver/Driver.cpp
+1-1clang/test/Driver/hip-toolchain-no-rdc.hip
+28-242 files

LLVM/project a955b3cllvm/lib/Target/RISCV RISCVTargetTransformInfo.h, llvm/test/Transforms/LoopVectorize/RISCV conditional-scalar-assignment.ll conditional-scalar-assignment-fold-tail.ll

[LV] Enable scalable FindLast on RISCV. (#184931)

This patch enables FindLast reduction vectorization with scalable vectors
on RISCV.
DeltaFile
+172-0llvm/test/Transforms/LoopVectorize/RISCV/conditional-scalar-assignment.ll
+129-0llvm/test/Transforms/LoopVectorize/RISCV/conditional-scalar-assignment-fold-tail.ll
+21-35llvm/test/Transforms/LoopVectorize/RISCV/select-cmp-reduction.ll
+1-0llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+323-354 files

LLVM/project d27cbc5llvm/lib/Transforms/Scalar DeadStoreElimination.cpp, llvm/test/Transforms/DeadStoreElimination dead-stores-via-dom-conditions.ll

[DSE] Introduce `eliminateRedundantStoresViaDominatingConditions` (#181709)

While optimizing tautological assignments, if there exists a dominating
condition that implies the value being stored in a pointer, and such a
condition appears in a node that dominates the store via equality edge,
then subsequent stores may be redundant, if no write occurs in between.
This is achieved via a DFS top-down walk of the dom-tree, collecting
dominating conditions and propagating them to each subtree, popping them
upon backtracking.

This also generalizes `dominatingConditionImpliesValue` transform, which
was previously taking into account only the immediate dominator.

Compile-time:
https://llvm-compile-time-tracker.com/compare.php?from=f8906704104e446a7482aeca32d058b91867e05c&to=24c5d61f1e28acbe6a59ea4e9a5da0ffcee3bf1a&stat=instructions:u.

Compile-time w/ limit on recursion:
https://llvm-compile-time-tracker.com/compare.php?from=24c5d61f1e28acbe6a59ea4e9a5da0ffcee3bf1a&to=9889567fe8a0515ab895b22003c93fabfd9ac4e5&stat=instructions:u.
Seems to alleviate the small regression in stage2-O3, but seemingly adds
one in stage2-O0-g.
DeltaFile
+121-62llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+0-3llvm/test/Transforms/DeadStoreElimination/dead-stores-via-dom-conditions.ll
+121-652 files

LLVM/project 48c59d1llvm/test/Transforms/DeadStoreElimination dead-stores-via-dom-conditions.ll

[DSE] Introduce tests for PR181709 (NFC) (#190454)
DeltaFile
+283-0llvm/test/Transforms/DeadStoreElimination/dead-stores-via-dom-conditions.ll
+283-01 files

LLVM/project 4818924llvm/lib/Target/AMDGPU AMDGPU.td

[AMDGPU] Enable real true16 on gfx1250
DeltaFile
+1-0llvm/lib/Target/AMDGPU/AMDGPU.td
+1-01 files

LLVM/project 5a50b22llvm/test/MC/AMDGPU vop3-literal-gfx1250.s vop3-literal.s

[AMDGPU] Update vop3-literal.s to use fake16 on gfx1250. NFC

16-bit instructions there are in fake16 mode and shall also be
compatible with older targets. The purpose of the test is to
check literals, so fake16 or real16 is not important.
DeltaFile
+296-0llvm/test/MC/AMDGPU/vop3-literal-gfx1250.s
+3-3llvm/test/MC/AMDGPU/vop3-literal.s
+299-32 files

LLVM/project da0aec2clang/test/Driver solaris-ld-sld.c, clang/test/Driver/Inputs/fake_ld ld

[clang][test] Fix solaris ld driver test to not assume gnu ld location (#186250)
DeltaFile
+5-0clang/test/Driver/Inputs/fake_ld/ld
+2-2clang/test/Driver/solaris-ld-sld.c
+7-22 files

LLVM/project 093c639llvm/test/Transforms/LoopVectorize optimal-epilog-vectorization-liveout.ll

[LV] Add additional tests with IV live-outs. (NFC) (#190395)

Add additional tests with IV live-out users, for which epilogue
vectorization is not enabled yet.

Also modernize check lines.
DeltaFile
+357-73llvm/test/Transforms/LoopVectorize/optimal-epilog-vectorization-liveout.ll
+357-731 files

LLVM/project e0908cdllvm/test/CodeGen/AMDGPU integer-mad-patterns.ll fcanonicalize.bf16.ll

[AMDGPU] Specialize gfx1250 codegen tests for fake and real t16. NFC. (#190390)

This is preparation of turning on real true16, so we can easily
apply it or revert.
DeltaFile
+1,318-117llvm/test/CodeGen/AMDGPU/integer-mad-patterns.ll
+835-387llvm/test/CodeGen/AMDGPU/fcanonicalize.bf16.ll
+610-305llvm/test/CodeGen/AMDGPU/atomics-system-scope.ll
+505-259llvm/test/CodeGen/AMDGPU/insert_vector_elt.v2bf16.ll
+460-214llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+384-170llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+4,112-1,45227 files not shown
+6,175-2,28333 files

LLVM/project bc3386cllvm/test/tools/dsymutil/AArch64 pseudo-probe.test, llvm/tools/dsymutil MachOUtils.cpp

[dsymutil] Add support for pseudo probes (#186877)

This patch teaches dsymutil to transfer the `__PSEUDO_PROBE` segment and
`__probes` and `__probe_descs` section when creating dSYMs. Without this, both probe sections will get an invalid offset in the dsym bundle.
DeltaFile
+315-0llvm/test/tools/dsymutil/AArch64/pseudo-probe.test
+65-7llvm/tools/dsymutil/MachOUtils.cpp
+380-72 files

LLVM/project 38f8945mlir/lib/Analysis/Presburger Matrix.cpp

[MLIR][Presburger] Fix stale pivot in Smith normal form (#189789)

The pivot used to fix divisibility in Smith normal form is stale. This
will not affect correctness, but can lower efficiency since the outer
loop will be executed more times.

Thanks for @benquike of discovering this.
DeltaFile
+1-3mlir/lib/Analysis/Presburger/Matrix.cpp
+1-31 files

LLVM/project e6e388cllvm/include/llvm/MC TargetRegistry.h MCLFI.h, llvm/lib/MC MCLFI.cpp MCELFStreamer.cpp

[LFI][MC] Call setLFIRewriter during LFIMCStreamer initialization (#188625)

Calls `Streamer.setLFIRewriter` during generic LFIMCStreamer
initialization rather than requiring it to be done during
backend-specific initialization. This better follows the existing
conventions in `create*` functions in `TargetRegistry.h`.

Also re-adds the call to initSections for LFI in `llvm-mc.cpp`
(necessary in order to emit the ABI Note section), along with a test to
make sure ABI note emission with the rewriter is working.
DeltaFile
+20-14llvm/lib/MC/MCLFI.cpp
+15-0llvm/test/MC/AArch64/LFI/abi-note.s
+6-5llvm/include/llvm/MC/TargetRegistry.h
+4-0llvm/lib/MC/MCELFStreamer.cpp
+4-0llvm/lib/MC/MCAsmStreamer.cpp
+2-0llvm/include/llvm/MC/MCLFI.h
+51-196 files

LLVM/project 3080198clang/lib/Sema SemaLookup.cpp SemaDeclCXX.cpp, clang/test/SemaCXX using-if-exists.cpp

Revert "[clang] Fix conflicting declaration error with using_if_exists" (#190441)

Reverts llvm/llvm-project#167646
DeltaFile
+28-53clang/test/SemaCXX/using-if-exists.cpp
+4-29clang/lib/Sema/SemaLookup.cpp
+12-4clang/lib/Sema/SemaDeclCXX.cpp
+44-863 files

LLVM/project 8e79157clang-tools-extra/clang-doc JSONGenerator.cpp MDMustacheGenerator.cpp, clang-tools-extra/clang-doc/support Utils.h File.cpp

[clang-doc] Fix file header style

Since we're fixing headers, we can also improve the file documentation
to follow the llvm coding standard.
DeltaFile
+16-0clang-tools-extra/clang-doc/JSONGenerator.cpp
+8-0clang-tools-extra/clang-doc/support/Utils.h
+6-0clang-tools-extra/clang-doc/support/File.cpp
+6-0clang-tools-extra/clang-doc/support/File.h
+6-0clang-tools-extra/clang-doc/support/Utils.cpp
+4-1clang-tools-extra/clang-doc/MDMustacheGenerator.cpp
+46-16 files

LLVM/project 5cd98f9llvm/lib/Target/RISCV RISCVInstrInfo.td RISCVInstrInfoP.td, llvm/test/CodeGen/RISCV rvp-ext-rv64.ll rvp-ext-rv32.ll

[RISCV] Select add(vec, splat(scalar)) to PADD_*S for P extension (#190303)
DeltaFile
+73-6llvm/test/CodeGen/RISCV/rvp-ext-rv64.ll
+49-4llvm/test/CodeGen/RISCV/rvp-ext-rv32.ll
+5-0llvm/lib/Target/RISCV/RISCVInstrInfo.td
+3-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+130-104 files

LLVM/project 6f68502mlir/test/Dialect/XeGPU sg-to-wi-experimental.mlir

[MLIR][XeGPU] Port tests from the XeGPUSubgroupDistribute to XeGPUSgToWiDistributeExperimental (#189747)

This PR ports tests from subgroup-distribute.mlir (old pass) to
sg-to-wi-experimental.mlir (new pass)
DeltaFile
+297-1mlir/test/Dialect/XeGPU/sg-to-wi-experimental.mlir
+297-11 files

LLVM/project 7453db1llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll memory-legalizer-private-singlethread.ll, llvm/test/CodeGen/X86 vector-interleaved-load-i64-stride-7.ll

Address review comments

Created using spr 1.3.6-beta.1
DeltaFile
+6,835-6,798llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+6,432-6,562llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-7.ll
+8,836-1,658llvm/test/CodeGen/AMDGPU/memory-legalizer-private-singlethread.ll
+8,836-1,658llvm/test/CodeGen/AMDGPU/memory-legalizer-private-wavefront.ll
+8,836-1,658llvm/test/CodeGen/AMDGPU/memory-legalizer-private-workgroup.ll
+8,737-1,643llvm/test/CodeGen/AMDGPU/memory-legalizer-private-agent.ll
+48,512-19,9778,821 files not shown
+674,703-253,8688,827 files

LLVM/project 999ce11llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll memory-legalizer-private-singlethread.ll, llvm/test/CodeGen/X86 vector-interleaved-load-i64-stride-7.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.6-beta.1

[skip ci]
DeltaFile
+6,835-6,798llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+6,432-6,562llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-7.ll
+8,836-1,658llvm/test/CodeGen/AMDGPU/memory-legalizer-private-singlethread.ll
+8,836-1,658llvm/test/CodeGen/AMDGPU/memory-legalizer-private-workgroup.ll
+8,836-1,658llvm/test/CodeGen/AMDGPU/memory-legalizer-private-wavefront.ll
+8,737-1,643llvm/test/CodeGen/AMDGPU/memory-legalizer-private-cluster.ll
+48,512-19,9778,820 files not shown
+674,690-253,8648,826 files