SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [InstCombine] Erase old add when optimizing add overflow (details)
  2. [InstCombine] Use replaceOperand() in assoc cast simplification (details)
  3. [MLIR] Add missing asserts in interchangeLoops util, doc comment update (details)
  4. [InstCombine] Use replaceOperand() in demanded elements simplification (details)
  5. [InstCombine] Erase old mul when creating umulo (details)
  6. [X86] Add isAnyZero shuffle mask helper (details)
  7. Fix -Wdocumentation warning. NFC. (details)
  8. [X86][AVX] Combine 128/256-bit lane shuffles with zeroable upper subvectors to EXTRACT_SUBVECTOR (PR40720) (details)
  9. clang-format fixes in ClangTidyDiagnosticConsumer.cpp and DiagnosticsTets.cpp (details)
  10. [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions (details)
  11. [MC] Move deprecation infos from MCTargetDesc to MCInstrInfo (details)
  12. [gn build] Port 854f268ca62 (details)
  13. [ARM] VMOV.64 immediate tests. NFC (details)
  14. [ELF][test] Improve arm-exidx-output.s to test different output text sections (details)
  15. Don't claim template names that name non-templates are undeclared. (details)
  16. [ARMMVE] Create fewer temporary SmallVectors (details)
  17. [X86] Add sse4.2 command lines to min/max reduction tests. (details)
  18. [InstCombine] Add tests for trunc (extelt x); (NFC) (details)
  19. [X86] Add sse4.1 RUNs lines to the min/max reduction cost model tests. (details)
  20. Revert "[libc++] NFC: Simplify substitutions by using lit recursive substitutions" (details)
  21. [LLD][ELF] Put back rounding which was lost in 8404aeb56a73ab24f9b295111de3b37a37f0b841 (details)
  22. [Coroutines 1/2] Improve symmetric control transfer feature (details)
  23. [Coroutines 2/2] Improve symmetric control transfer feature (details)
  24. PR45350: Handle unsized array CXXConstructExprs in constant evaluation (details)
  25. [LangRef] Clarify the semantics of branch on undef (details)
  26. [mlir][Diagnostics] Don't print note source line if it is the same as the previous diagnostic (details)
  27. [mlir][NFC] Use the auto-generated op documentation in the standard dialect documentation (details)
  28. [mlir][NFC] Update dialect/op documentation to be consistent (details)
  29. [NFC] Remove obsolete checks followed by fix of isGuaranteedToTransferExecutionToSuccessor (details)
Commit a9ddcd6411bcbffe551641a91413c417de491189 by nikita.ppv
[InstCombine] Erase old add when optimizing add overflow

We don't return the replaceInstUsesWith() result, so we're
responsible for cleaning up.

NFC apart from worklist order changes.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 0c8714006582dc4a4e7c646c7dba2ef8302ed85a by nikita.ppv
[InstCombine] Use replaceOperand() in assoc cast simplification

To make sure the old operands are DCEd.

NFC apart from worklist order.
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit 4e4ea2cde44db699e6111caee4a1a71ae8d0b9d6 by uday
[MLIR] Add missing asserts in interchangeLoops util, doc comment update

Add missing assert checks for input to mlir::interchangeLoops utility.
Rename interchangeLoops -> permuteLoops; update doc comments to clarify
inputs / return val. Other than the assert checks, this is NFC.

Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>

Differential Revision: https://reviews.llvm.org/D77003
The file was modifiedmlir/include/mlir/Transforms/LoopUtils.h
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
Commit 53d209076aa877e4e40edaaf3614f33285e1851b by nikita.ppv
[InstCombine] Use replaceOperand() in demanded elements simplification

To make sure that dead operands get DCEd. This fixes the largest
source of leftover dead operands we see in tests.

NFC apart from worklist changes.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Commit 8253a86b65c626f470e90ddacba1166b81012b12 by nikita.ppv
[InstCombine] Erase old mul when creating umulo

As we don't return the result of replaceInstUsesWith(), we are
responsible for erasing the instruction.

There is a small subtlety here in that we need to do this after
the other uses of Builder, which uses the original multiply as
the insertion point.

NFC apart from worklist order changes.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 8206c50cdec1551cf6e51da2bc492b8daaf80e1d by llvm-dev
[X86] Add isAnyZero shuffle mask helper
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit fe0723dc9d45acfa4511961b208b7817b09297ec by llvm-dev
Fix -Wdocumentation warning. NFC.

gcc was misinterpreting the template code snippet as html.
The file was modifiedclang/include/clang/AST/PrettyPrinter.h
Commit 9c8ec99c80a5ad9b21d424d77fb19f825319b284 by llvm-dev
[X86][AVX] Combine 128/256-bit lane shuffles with zeroable upper subvectors to EXTRACT_SUBVECTOR (PR40720)

As explained on PR40720, EXTRACTF128 is always as good/better than VPERM2F128/SHUF128, and we can use the implicit zeroing of the uppers.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-512-v8.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-mul.ll
Commit 15f1fe1506f5e860409fddd8e62ed5508855ff79 by zeratul976
clang-format fixes in ClangTidyDiagnosticConsumer.cpp and DiagnosticsTets.cpp

Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77023
The file was modifiedclang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Commit b9d9968f63ab8f24b300c69be11eadda3d405ac5 by zeratul976
[clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

Summary:
Not handling this was a side-effect of being overly cautious when trying
to avoid reading files for which clangd doesn't have the source mapped.

Fixes https://github.com/clangd/clangd/issues/266

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet,
usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75286
The file was modifiedclang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
The file was modifiedclang-tools-extra/clangd/ParsedAST.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Commit 854f268ca62e0138bb36469a58a3bf040a8e9984 by benny.kra
[MC] Move deprecation infos from MCTargetDesc to MCInstrInfo

This allows emitting it only when the feature is used by a target.
Shrinks Release+Asserts clang by 900k.
The file was modifiedllvm/utils/TableGen/InstrInfoEmitter.cpp
The file was modifiedllvm/lib/MC/MCInstrDesc.cpp
The file was addedllvm/lib/MC/MCInstrInfo.cpp
The file was modifiedllvm/include/llvm/MC/MCInstrInfo.h
The file was modifiedllvm/unittests/CodeGen/MachineInstrTest.cpp
The file was modifiedllvm/lib/MC/CMakeLists.txt
The file was modifiedllvm/utils/TableGen/AsmMatcherEmitter.cpp
The file was modifiedllvm/include/llvm/MC/MCInstrDesc.h
Commit 6628c525cba17ec0914e8c7130147a0fca497cef by llvmgnsyncbot
[gn build] Port 854f268ca62
The file was modifiedllvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn
Commit 7c1a6873aa53b11605e8860b0ae3ff11bb6e9a02 by david.green
[ARM] VMOV.64 immediate tests. NFC
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmovimm.ll
Commit 00c76f34962e822fa9bb5f16e516620a47c566ae by maskray
[ELF][test] Improve arm-exidx-output.s to test different output text sections

Delete arm-exidx-link.s which is now covered by arm-exidx-output.s

Differential Revision: https://reviews.llvm.org/D76409
The file was removedlld/test/ELF/arm-exidx-link.s
The file was modifiedlld/test/ELF/arm-exidx-output.s
Commit a5458bb0d6b1c35c7dcca4f339e77c40f5fc5e06 by richard
Don't claim template names that name non-templates are undeclared.
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/test/SemaCXX/pseudo-destructors.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/include/clang/Sema/Sema.h
Commit 6e0afb5f108fe0570268978f4b32a0c8b4a43ee1 by benny.kra
[ARMMVE] Create fewer temporary SmallVectors

Shrinks clang by 40k.
The file was modifiedclang/utils/TableGen/MveEmitter.cpp
Commit 2451e4c597885aaa76a1a70f98056ecca7d23cf8 by craig.topper
[X86] Add sse4.2 command lines to min/max reduction tests.

SSE4.2 has the pcmpgtq instruction which we will use in
vXi64 reductions when its available.
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-smin.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-umax.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-umin.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-smax.ll
Commit 24562c6588bf45d4ca51a4934dc2e220f16130b1 by spatel
[InstCombine] Add tests for trunc (extelt x); (NFC)
Baseline tests for D76983 (PR45314)

Differential Revision: https://reviews.llvm.org/D77024
The file was addedllvm/test/Transforms/InstCombine/trunc-extractelement.ll
Commit d74533a18b8c442f2e17a4c326393ecc36931244 by craig.topper
[X86] Add sse4.1 RUNs lines to the min/max reduction cost model tests.

Mostly this matches the sse4.2 we already had command lines for.
Except in the i64 case since sse4.1 doesn't have pcmpgtq.
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-smax.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-smin.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-fmax.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-fmin.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-umax.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-umin.ll
Commit 12f6b024f9f58cee72770849a8c86a1436046ff7 by dave
Revert "[libc++] NFC: Simplify substitutions by using lit recursive substitutions"

This reverts commit cd7f9751c30092033a5e97591876f972daf61989 which has
unintended breakage to non-libcxx projects when using the documented way
of building LLVM. (See the Getting Started guide. I.e. one big CMake setup.)
The file was modifiedlibcxx/utils/libcxx/test/config.py
The file was modifiedlibcxx/utils/libcxx/test/format.py
The file was modifiedlibcxx/test/lit.cfg
Commit 42dc667db248e27a44dc245d5c39ce1f8ad26a85 by alexandre.ganea
[LLD][ELF] Put back rounding which was lost in 8404aeb56a73ab24f9b295111de3b37a37f0b841
The file was modifiedlld/ELF/SyntheticSections.cpp
Commit a94fa2c0494c019b86c97b5a4a579f7889f49c95 by JunMa
[Coroutines 1/2] Improve symmetric control transfer feature

Differential Revision: https://reviews.llvm.org/D76911
The file was addedllvm/test/Transforms/Coroutines/coro-split-musttail2.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit 31a1d85c535e26ac90915b19953f753b4f5648cd by JunMa
[Coroutines 2/2] Improve symmetric control transfer feature

Differential Revision: https://reviews.llvm.org/D76913
The file was addedllvm/test/Transforms/Coroutines/coro-split-musttail3.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit 9a7eda1bece887ca9af085d79fe6e4fb8826dcda by richard
PR45350: Handle unsized array CXXConstructExprs in constant evaluation
of array new expressions with runtime bound.
The file was modifiedclang/test/SemaCXX/constant-expression-cxx2a.cpp
The file was modifiedclang/lib/AST/ExprConstant.cpp
Commit 05f0e598ab265a80fedb23225cde4176f11774ac by aqjune
[LangRef] Clarify the semantics of branch on undef

Summary:
This patch clarifies the semantics of branching on undef value.

Defining `br undef` as undefined behavior explains optimizations that use branch conditions, such as CVP (D76931) and GVN (propagateEquality).

For `switch cond`, it is defined to raise UB if cond is an expression containing undef && cond is not frozen &&
it may yield different values.
This allows that at the destination block the branch condition can be assumed to be frozen already (otherwise UB was already triggered).
This condition is slightly stricter than MemorySanitizer, which allows undef-y condition if it always leads to the same destination,
but it does not break MemorySanitizer because we are giving stricter constraint.

Reviewers: efriedma, fhahn, nikic, spatel, jdoerfert, nlopes

Reviewed By: nlopes

Subscribers: regehr, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76973
The file was modifiedllvm/docs/LangRef.rst
Commit 3d44f48edc271dc2e1f68d5281f7f4bd11949340 by riddleriver
[mlir][Diagnostics] Don't print note source line if it is the same as the previous diagnostic

Summary: This revision updates the SourceMgrDiagnosticHandler to not print the source location of a note if it is the same location as the previously printed diagnostic. This helps avoid redundancy, and potential confusion, when looking at the diagnostic output.

Differential Revision: https://reviews.llvm.org/D76787
The file was modifiedmlir/test/IR/diagnostic-handler.mlir
The file was modifiedmlir/include/mlir/IR/Diagnostics.h
The file was modifiedmlir/lib/IR/Diagnostics.cpp
Commit f86104bb68d0d7e38f6f98f29d551b5e659bb0fb by riddleriver
[mlir][NFC] Use the auto-generated op documentation in the standard dialect documentation

Summary: This revision updates the dialect documentation to use the auto-generated markdown for operations. This allows for updating some out-of-date bits of documentation, and allows for displaying a large of number of newly added operations that did not have a counter part in Standard.md.

Differential Revision: https://reviews.llvm.org/D76743
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/docs/Dialects/Standard.md
Commit 16f27b70a50ccfe6929cdc6d182b89ac98e8e9f7 by riddleriver
[mlir][NFC] Update dialect/op documentation to be consistent

Summary:
This revision performs a lot of different cleanups on operation documentation to ensure that they are consistent, e.g. using mlir code blocks, formatting, etc.

This revision also includes the auto-generated documentation into the hand-written documentation for the dialects that have a specific top-level dialect file. This updates the documentation for all dialects aside from SPIRV and STD. These dialects will be updated in a followup.

Differential Revision: https://reviews.llvm.org/D76734
The file was modifiedmlir/docs/Dialects/Affine.md
The file was modifiedmlir/docs/Dialects/LLVM.md
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/CMakeLists.txt
The file was modifiedmlir/docs/Dialects/Linalg.md
The file was modifiedmlir/include/mlir/Dialect/Quant/QuantOps.td
The file was modifiedmlir/docs/Dialects/GPU.md
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
The file was modifiedmlir/include/mlir/Dialect/GPU/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/LoopOps/LoopOps.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.td
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
Commit 4e0d9925d6a3561449bdd8def27fd3f3f1b3fb9f by mkazantsev
[NFC] Remove obsolete checks followed by fix of isGuaranteedToTransferExecutionToSuccessor

In past, isGuaranteedToTransferExecutionToSuccessor contained some weird logic
for volatile loads/stores that was ultimately removed by patch D65375. It's time to
remove a piece of dependent logic that used to be a workaround for the code which
is now deleted.

Reviewed By: uenoku
Differential Revision: https://reviews.llvm.org/D76918
The file was modifiedllvm/lib/Analysis/InstructionPrecedenceTracking.cpp