SuccessChanges

Summary

  1. [SCEV] Refactor isHighCostExpansionHelper (details)
  2. [MLIR][Standard] Add `dynamic_tensor_from_elements` operation (details)
  3. [obj2yaml] Add support for dumping the .debug_str section. (details)
  4. [X86][AVX] Use lowerShuffleWithPERMV in shuffle combining to support non-VLX targets (details)
  5. X86AvoidStoreForwardingBlocks.cpp - use unsigned for Opcode values. NFCI. (details)
  6. [llvm-readobj/elf] - Introduce Relocation<ELFT> helper. (details)
  7. LegalizeTypes.h - remove orphan SplitVSETCC declaration. NFCI. (details)
  8. [MLIR][Shape] Merge `shape` to `std`/`scf` lowerings. (details)
  9. [MLIR] Fix Win test due to partial order of CHECK directives (details)
  10. [InstCombine] give a name to an intermediate value for easier tracking; NFC (details)
  11. [InstCombine] add test with more unreachable insts; NFC (details)
  12. [SelectionDAG] memcpy expansion of const volatile struct ignores const zero (details)
  13. [X86] Replace EmitX86AddSubSatExpr with EmitX86BinaryIntrinsic generic helper. NFCI. (details)
  14. MachineStableHash.h - remove MachineInstr.h include. NFC. (details)
  15. [llvm-readobj/elf] - Generalize the code for printing dynamic relocations. NFCI. (details)
  16. Revert "[MLIR][Shape] Merge `shape` to `std`/`scf` lowerings." (details)
  17. Revert "[clang] Prevent that Decl::dump on a CXXRecordDecl deserialises further declarations." (details)
  18. [gn build] Port 23f700c785a (details)
  19. [X86] Update SSE/AVX ABS intrinsics to emit llvm.abs.* (PR46851) (details)
  20. [X86][SSE] Move llvm.x86.ssse3.pabs.*.128 intrinsics to ssse3-intrinsics-x86-upgrade.ll (details)
  21. [KillTheDoctor/CMake] Add missing keyword PRIVATE in target_link_libraries (details)
  22. [llvm-readobj] - Remove code duplication when printing dynamic relocations. NFCI. (details)
  23. [NFC][PowerPC] Add tests in constants-i64.ll. (details)
  24. [mlir] Take ValueRange instead of ArrayRef<Value> in StructuredIndexed (details)
  25. [X86][SSE] Use llvm.abs.* vector intrinsics instead of old (deprecated) SSE/AVX intrinsics for combine tests (details)
  26. [X86] Auto upgrade SSE/AVX PABS intrinsics to generic Intrinsic::abs (details)
  27. Follow up of rG5f1cad4d296a, slightly reduced test case. NFC. (details)
Commit 928c4b4b4988b4d633a96afa4c7f4584bc0009e5 by sam.parker
[SCEV] Refactor isHighCostExpansionHelper

To enable the cost of constants, the helper function has been
reorganised:
- A struct has been introduced to hold SCEV operand information so
  that we know the user of the operand, as well as the operand index.
  The Worklist now uses instead instead of a bare SCEV.
- The costing of each SCEV, and collection of its operands, is now
  performed in a helper function.

Differential Revision: https://reviews.llvm.org/D86050
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
Commit 136eb79a8846c4e8ff6ba5ccfc0c470ab351fb13 by frgossen
[MLIR][Standard] Add `dynamic_tensor_from_elements` operation

With `dynamic_tensor_from_elements` tensor values of dynamic size can be
created. The body of the operation essentially maps the index space to tensor
elements.

Declare SCF operations in the `scf` namespace to avoid name clash with the new
`std.yield` operation. Resolve ambiguities between `linalg/shape/std/scf.yield`
operations.

Differential Revision: https://reviews.llvm.org/D86276
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Loops.cpp
The file was modifiedmlir/test/Dialect/Standard/ops.mlir
The file was modifiedmlir/test/Dialect/Standard/invalid.mlir
The file was modifiedmlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/SCFOps.td
The file was modifiedmlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
Commit 3097427f93dde9a49f729e995b8d52d91cc30d4c by Xing
[obj2yaml] Add support for dumping the .debug_str section.

This patch adds support for dumping the .debug_str section to obj2yaml.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D86867
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was addedllvm/test/tools/obj2yaml/ELF/DWARF/debug-str.yaml
Commit 9b645ebfff168fcf3cf29b21f49762a04d8ceb37 by llvm-dev
[X86][AVX] Use lowerShuffleWithPERMV in shuffle combining to support non-VLX targets

lowerShuffleWithPERMV allows us to use the ZMM variants for 128/256-bit variable shuffles on non-VLX AVX512 targets.

This is another step towards shuffle combining through between vector widths - we still end up with an annoying regression (combine_vpermilvar_vperm2f128_zero_8f32) but we're going in the right direction....
The file was modifiedllvm/test/CodeGen/X86/shuffle-strided-with-offset-256.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-avx512.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-combining-avx.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-combining-avx2.ll
The file was modifiedllvm/test/CodeGen/X86/vector-zext.ll
The file was modifiedllvm/test/CodeGen/X86/insertelement-ones.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/shuffle-strided-with-offset-512.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-512-v16.ll
Commit 5bb27e735d3ba561b93a12e07d79cd88a5bff338 by llvm-dev
X86AvoidStoreForwardingBlocks.cpp - use unsigned for Opcode values. NFCI.

Fixes clang-tidy cppcoreguidelines-narrowing-conversions warnings.
The file was modifiedllvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
Commit 3a86eb03d54ef80cf498d9473a1c735c93cdfa66 by grimar
[llvm-readobj/elf] - Introduce Relocation<ELFT> helper.

It removes templating for Elf_Rel[a] handling that we
introduced earlier and introduces a helper class instead.

It was briefly discussed in D87087, which showed,
why having templates is probably not ideal for the generalization
of dumpers code.

Differential revision: https://reviews.llvm.org/D87141
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit e57cbcbdc18adcadc6c97ff4f3f81b0f4b81c698 by llvm-dev
LegalizeTypes.h - remove orphan SplitVSETCC declaration. NFCI.

The implementation no longer exists
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
Commit 15acdd75439b402e993ebe0dbf8eb02e9b88bbdc by frgossen
[MLIR][Shape] Merge `shape` to `std`/`scf` lowerings.

Merge the two lowering passes because they are not useful by themselves. The new
pass lowers to `std` and `scf` is considered an auxiliary dialect.

See also
https://llvm.discourse.group/t/conversions-with-multiple-target-dialects/1541/12

Differential Revision: https://reviews.llvm.org/D86779
The file was removedmlir/include/mlir/Conversion/ShapeToSCF/ShapeToSCF.h
The file was modifiedmlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
The file was modifiedmlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
The file was removedmlir/lib/Conversion/ShapeToSCF/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was removedmlir/test/Conversion/ShapeToSCF/shape-to-scf.mlir
The file was removedmlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp
Commit 1c849ec40a53ca017a668b957fef333e560b0886 by ntv
[MLIR] Fix Win test due to partial order of CHECK directives

Differential Revision: https://reviews.llvm.org/D87230
The file was modifiedmlir/test/Conversion/VectorToSCF/vector-to-loops.mlir
Commit 3ca8b9a560a249a18b9f6092b96aa7e8e52db5cf by spatel
[InstCombine] give a name to an intermediate value for easier tracking; NFC

As noted in PR47430, we probably want to conditionally include 'nsw'
here anyway, so we are going to need to fill out the optional args.
The file was modifiedllvm/test/Transforms/InstCombine/sub.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Commit 28aa60aae25b7e46804deae909b29b66c1b41d95 by spatel
[InstCombine] add test with more unreachable insts; NFC

Goes with D87149
The file was modifiedllvm/test/Transforms/InstCombine/assume.ll
Commit 79ea83e104e368ef0f520f1bfa74c15d91baef93 by simon.wallis2
[SelectionDAG] memcpy expansion of const volatile struct ignores const zero

In getMemcpyLoadsAndStores(), a memcpy where the source is a zero constant is expanded to a MemOp::Set instead of a MemOp::Copy, even when the memcpy is volatile.
This is incorrect.

The fix is to add a check for volatile, and expand to MemOp::Copy in the volatile case.

Reviewed By: chill

Differential Revision: https://reviews.llvm.org/D87134
The file was addedllvm/test/CodeGen/ARM/memcpy-const-vol-struct.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit a8a91533dd65041ced68ed5b9348b5d023837488 by llvm-dev
[X86] Replace EmitX86AddSubSatExpr with EmitX86BinaryIntrinsic generic helper. NFCI.

Feed the Intrinsic::ID value directly instead of via the IsSigned/IsAddition bool flags.
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 6670f5d1e66563ad482576d9db4b8393539ab53b by llvm-dev
MachineStableHash.h - remove MachineInstr.h include. NFC.

Use forward declarations and move the include to MachineStableHash.cpp
The file was modifiedllvm/lib/CodeGen/MachineStableHash.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineStableHash.h
Commit dbb81881955d641bc873442e75874a5cb160f4ee by grimar
[llvm-readobj/elf] - Generalize the code for printing dynamic relocations. NFCI.

Currently we have 2 large `printDynamicRelocations` methods that
have a very similar code for GNU/LLVM styles.

This patch removes the duplication and renames them to `printDynamicReloc`
for consistency.

Differential revision: https://reviews.llvm.org/D87087
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 973800dc7cbe28a98030293e77afa8ea0343c37d by david.truby
Revert "[MLIR][Shape] Merge `shape` to `std`/`scf` lowerings."

This reverts commit 15acdd75439b402e993ebe0dbf8eb02e9b88bbdc.
The file was addedmlir/lib/Conversion/ShapeToSCF/CMakeLists.txt
The file was modifiedmlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
The file was modifiedmlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was addedmlir/test/Conversion/ShapeToSCF/shape-to-scf.mlir
The file was addedmlir/include/mlir/Conversion/ShapeToSCF/ShapeToSCF.h
The file was addedmlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp
Commit 23f700c785a141355fa6d022552aafc73135bf5d by Raphael Isemann
Revert "[clang] Prevent that Decl::dump on a CXXRecordDecl deserialises further declarations."

This reverts commit 0478720157f6413fad7595b8eff9c70d2d99b637. This probably
doesn't work when forcing deserialising while dumping (which the ASTDumper
optionally supports).
The file was modifiedclang/lib/AST/TextNodeDumper.cpp
The file was modifiedclang/test/AST/ast-dump-records.cpp
The file was modifiedclang/unittests/AST/CMakeLists.txt
The file was modifiedclang/test/AST/ast-dump-lambda.cpp
The file was removedclang/unittests/AST/ASTDumpTest.cpp
Commit bb73fcfd0708d8f145060afa461d96f98f0e5f27 by llvmgnsyncbot
[gn build] Port 23f700c785a
The file was modifiedllvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
Commit 2853ae3c1b8174e3660424ffac45922601f700ee by llvm-dev
[X86] Update SSE/AVX ABS intrinsics to emit llvm.abs.* (PR46851)

We're now getting close to having the necessary analysis/combines etc. for the new generic llvm.abs.* intrinsics.

This patch updates the SSE/AVX ABS vector intrinsics to emit the generic equivalents instead of the icmp+sub+select code pattern.

Differential Revision: https://reviews.llvm.org/D87101
The file was modifiedclang/test/CodeGen/ssse3-builtins.c
The file was modifiedllvm/test/CodeGen/X86/ssse3-intrinsics-fast-isel.ll
The file was modifiedclang/test/CodeGen/avx512f-builtins.c
The file was modifiedclang/test/CodeGen/avx512bw-builtins.c
The file was modifiedllvm/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/test/CodeGen/avx2-builtins.c
The file was modifiedclang/test/CodeGen/avx512vlbw-builtins.c
The file was modifiedclang/test/CodeGen/avx512vl-builtins.c
Commit f6db681a78994dd7eb7da62da73754d1321085b3 by llvm-dev
[X86][SSE] Move llvm.x86.ssse3.pabs.*.128 intrinsics to ssse3-intrinsics-x86-upgrade.ll

These have been auto upgraded for some time so this is just a tidyup.
The file was modifiedllvm/test/CodeGen/X86/ssse3-intrinsics-x86.ll
The file was addedllvm/test/CodeGen/X86/ssse3-intrinsics-x86-upgrade.ll
Commit 6b954f1b79605e4139157ce064fe695c86a0f06a by raul.tambre
[KillTheDoctor/CMake] Add missing keyword PRIVATE in target_link_libraries

Add PRIVATE keyword in target_link_libraries to prevent CMake Error on Windows.

While trying to compile llvm/clang on Windows, the following CMake error occurred. The reason is a missing PUBLIC/PRIVATE/INTERFACE keyword in target_link_libraries.

`
CMake Error at utils/KillTheDoctor/CMakeLists.txt:5 (target_link_libraries):
  The keyword signature for target_link_libraries has already been used with
  the target "KillTheDoctor".  All uses of target_link_libraries with a
  target must be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * cmake/modules/AddLLVM.cmake:771 (target_link_libraries)
`

Reviewed By: tambre

Differential Revision: https://reviews.llvm.org/D87203
The file was modifiedllvm/utils/KillTheDoctor/CMakeLists.txt
Commit 4368739941eb1336197dde0e92eb23ce79739ac7 by grimar
[llvm-readobj] - Remove code duplication when printing dynamic relocations. NFCI.

LLVM style code can be simplified to avoid the duplication of logic
related to printing dynamic relocations.

Differential revision: https://reviews.llvm.org/D87089
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit a5046f7acece0085cb6f457da7ebca34d267155a by esme.yi
[NFC][PowerPC] Add tests in constants-i64.ll.
The file was modifiedllvm/test/CodeGen/PowerPC/constants-i64.ll
Commit 1e1a4a481987f77fe3e6debc015c1d07af249258 by zinenko
[mlir] Take ValueRange instead of ArrayRef<Value> in StructuredIndexed

This was likely overlooked when ValueRange was first introduced. There is no
reason why StructuredIndexed needs specifically an ArrayRef so use ValueRange
for better type compatibility with the rest of the APIs.

Reviewed By: nicolasvasilache, mehdi_amini

Differential Revision: https://reviews.llvm.org/D87127
The file was modifiedmlir/include/mlir/EDSC/Builders.h
Commit 4b530f75199d9b5e7ee1f4e86e1513a83b4b86cb by llvm-dev
[X86][SSE] Use llvm.abs.* vector intrinsics instead of old (deprecated) SSE/AVX intrinsics for combine tests

This also allows us to extend testing to SSE2+ targets
The file was modifiedllvm/test/CodeGen/X86/combine-abs.ll
Commit 96e0f34be797ab8bb80526367009495a7eb2118f by llvm-dev
[X86] Auto upgrade SSE/AVX PABS intrinsics to generic Intrinsic::abs

Minor followup to D87101, we were expanding this to a neg+icmp+select pattern like we were in CGBuiltin
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
Commit 288c582fc93956a7464a988a77c9f6d0f79ed65d by sjoerd.meijer
Follow up of rG5f1cad4d296a, slightly reduced test case. NFC.
The file was modifiedllvm/test/CodeGen/ARM/pr45824.ll