Changes

Summary

  1. [M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588) (details)
  2. [libc] Automatically add -mfma flag for architectures supporting FMA. (details)
  3. [SSAUpdaterImpl] Do not generate phi node with all the same incoming values (details)
  4. [NFC][MemDep] Remove unnecessary Worklist.clear (details)
  5. [LLVM][Docs] Update for HowToSetUpLLVMStyleRTTI.rst, NFC. (details)
  6. [mlir][cf] Implement missing SwitchOp::build function (details)
  7. [clang][driver] Dynamically select gcc-toolset/devtoolset (details)
  8. [ARM] Fix restoring stack for varargs with SEH split frame pointer push (details)
  9. [clang] [MSVC] Enable unwind tables for ARM (details)
  10. [Driver] Add multiarch path for RISC-V (details)
  11. [mlir][SCF] Add bufferization hook for scf.foreach_thread and terminator. (details)
  12. Revert "[SLP]Improve shuffles cost estimation where possible." (details)
  13. [clang-tidy] `bugprone-use-after-move`: Fix handling of moves in lambda captures (details)
  14. [clang][sema] Remove unused paramter from VerifyBitField (details)
  15. [NFC] Format CGBuilder.h (details)
  16. [DAGCombine] Handle promotion of shift with both operands the same (details)
  17. [mlir][OpenMP] Add memory_order clause tests (details)
  18. [flang][test-suite] Document need for NO_STOP_MESSAGE environment variable. NFC (details)
  19. [cmake] Fix typo in CrossCompile.cmake (details)
  20. [libc++] Fix conjunction/disjunction and mark a few LWG issues as complete (details)
  21. [clang-tidy] Add missing close quote in release notes. (details)
  22. [gn build] Port a29a1a33ac7b (details)
  23. [docs] Fix RST code-block syntax in HowToSetUpLLVMStyleRTTI.rst (details)
  24. [clang-tidy] Confusable identifiers detection (details)
  25. [AArch64] Add extra addp codegen tests. NFC (details)
  26. [mlir] Fix ClangTidy warning (NFC). (details)
  27. [VPlan] Replace CondBit with BranchOnCond VPInstruction. (details)
  28. [VPlan] Update failing HCFG unit tests after a5bb4a3b4d3db. (details)
  29. [SVE] Refactor sve-bitcast.ll to include all combinations for legal types. (details)
  30. [DAGCombiner] Add bf16 to the matrix of types that we don't promote to integer stores (details)
  31. [pp-trace] Print HashLoc in InclusionDirective callback (details)
  32. [gn build] (manually) port b94db7ed7eaf (Confusables.inc) (details)
  33. [VPlan] Inline variable into assertion. NFC. (details)
Commit 78b16ccf2b5c4ba4ebd7f1e2a2fc1dcad0e1a343 by ox59616e
[M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588)

This patch is trying to fix issue 48588(https://github.com/llvm/llvm-project/issues/48588)

I found the results of Instruction Selection between SelectionDAG and FastISEL for the `%mul = mul i32 %A, 4294967295`:
(seldag-isel) mul --> sub --> SUB32dp
(fast-isel)   mul --> sub --> NEG32d

My patch to fix this issue is by overriding a virtual function M68kDAGToDAGISel::IsProfitableToFold(). Return `false` when it was trying to match with SUB, then it will match with NEG.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D116886
The file was modifiedllvm/lib/Target/M68k/M68kISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/M68k/Arith/imul-neg.ll
Commit 614567a7bf4a7a4c2570ad9a499b77155dfb54ce by lntue
[libc] Automatically add -mfma flag for architectures supporting FMA.

Detect if the architecture supports FMA instructions and if
the targets depend on fma.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D123615
The file was modifiedlibc/src/__support/FPUtil/CMakeLists.txt
The file was modifiedlibc/src/math/generic/logf.cpp
The file was modifiedlibc/src/math/generic/log2f.cpp
The file was modifiedlibc/cmake/modules/LLVMLibCObjectRules.cmake
The file was modifiedlibc/src/math/fma.cpp
The file was modifiedlibc/src/__support/FPUtil/PolyEval.h
The file was modifiedlibc/src/math/fmaf.cpp
The file was modifiedlibc/src/math/CMakeLists.txt
The file was modifiedlibc/test/src/math/CMakeLists.txt
The file was modifiedlibc/src/__support/FPUtil/x86_64/PolyEval.h
The file was modifiedlibc/src/math/generic/log10f.cpp
The file was modifiedlibc/src/math/generic/expm1f.cpp
The file was modifiedlibc/src/math/generic/log1pf.cpp
The file was modifiedlibc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
The file was modifiedlibc/src/math/generic/expf.cpp
The file was modifiedlibc/src/math/generic/exp2f.cpp
The file was modifiedlibc/cmake/modules/LLVMLibCFlagRules.cmake
The file was modifiedlibc/src/__support/FPUtil/x86_64/FMA.h
The file was modifiedlibc/src/__support/architectures.h
The file was modifiedlibc/src/math/generic/CMakeLists.txt
Commit 24e16e4af20858e0c276d3cf4137b7a57afd2d19 by serguei.katkov
[SSAUpdaterImpl] Do not generate phi node with all the same incoming values

If all available vals to basic block are the same - do not build new phi node and
just use this value.

Reviewed By: sameerds
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D126525
The file was modifiedllvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll
The file was modifiedllvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir
The file was modifiedllvm/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
The file was modifiedllvm/test/Transforms/LICM/sink-debuginfo-preserve.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-ehsjlj.ll
Commit 8555e59a7172a7597f5eeecdc620f293297e2294 by mkazantsev
[NFC][MemDep] Remove unnecessary Worklist.clear

This execution path leads to return 'false' where the Worklist
will be deallocated anyways. No need to clear it separately.
The file was modifiedllvm/lib/Analysis/MemoryDependenceAnalysis.cpp
Commit 47231248f59b733b6351b71523c7067a9559228a by aman.lachapelle
[LLVM][Docs] Update for HowToSetUpLLVMStyleRTTI.rst, NFC.

This patch updates the document with some advanced use cases and examples on how to set up and use LLVM-style RTTI. It includes a few motivating examples to get readers comfortable with the concepts.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D126943
The file was modifiedllvm/docs/HowToSetUpLLVMStyleRTTI.rst
Commit b34fb277df672ca2de2721702b53bbb91f1d68dc by alexbatashev
[mlir][cf] Implement missing SwitchOp::build function

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D126594
The file was modifiedmlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
Commit 9f97720268911abae2ad9d90e270358db234a1c1 by tbaeder
[clang][driver] Dynamically select gcc-toolset/devtoolset

Instead of adding all devtoolset and gcc-toolset prefixes to the list of
prefixes, just scan the /opt/rh/ directory for the one with the highest
version number and only add that one.

Differential Revision: https://reviews.llvm.org/D125862
The file was modifiedclang/unittests/Driver/ToolChainTest.cpp
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
Commit 40c937cba239db817b53d47c4525a751a8c488a0 by martin
[ARM] Fix restoring stack for varargs with SEH split frame pointer push

Previously, the "add sp, #12" ended up inserted after "bx lr".

Differential Revision: https://reviews.llvm.org/D126872
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.cpp
The file was modifiedllvm/test/CodeGen/ARM/Windows/wineh-framepointer.ll
Commit e8402d5de82ace9399498570a6a2d5cf64463af3 by martin
[clang] [MSVC] Enable unwind tables for ARM

The backend now can generate working unwind information for this
target.

Improve the existing windows-exceptions.cpp testcase to check for
the state of unwind tables on all MSVC architectures.

Differential Revision: https://reviews.llvm.org/D126862
The file was modifiedclang/lib/Driver/ToolChains/MSVC.cpp
The file was modifiedclang/test/Driver/windows-exceptions.cpp
Commit 0d2186373f73995cfcc45f445024fbc9841c99d6 by hahnjo
[Driver] Add multiarch path for RISC-V

This is required to find headers on the Debian port for RISC-V.

Differential Revision: https://reviews.llvm.org/D126672
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp
Commit 72de7588cc8bf54b48f66e649f621ec182435e1a by nicolas.vasilache
[mlir][SCF] Add bufferization hook for scf.foreach_thread and terminator.

`scf.foreach_thread` results alias with the underlying `scf.foreach_thread.parallel_insert_slice` destination operands
and they bufferize to equivalent buffers in the absence of other conflicts.
`scf.foreach_thread.parallel_insert_slice` conflict detection is similar to `tensor.insert_slice` conflict detection.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D126769
The file was modifiedmlir/test/Dialect/SCF/one-shot-bufferize.mlir
The file was modifiedmlir/include/mlir/Dialect/SCF/SCFOps.td
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
Commit df0f30dc36c1703ad1fbefda90d74ca40f207077 by i
Revert "[SLP]Improve shuffles cost estimation where possible."

This reverts commit 9980c9971892378ea82475e000de8df210a58e69.

Caused assertion failures: https://reviews.llvm.org/D115462#3555350
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/resched.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/alternate-int-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/tsc-s116.ll
Commit 8b90b2539048a581052a4b0d7628ffba0cd582a9 by mboehme
[clang-tidy] `bugprone-use-after-move`: Fix handling of moves in lambda captures

Previously, we were treating a move in the lambda capture as if it happened
within the body of the lambda, not within the function that defines the lambda.

This fixes the same bug as https://reviews.llvm.org/D119165 (which it appears
may have been abandoned by the author?) but does so more simply.

Reviewed By: njames93

Differential Revision: https://reviews.llvm.org/D126780
The file was modifiedclang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
Commit a459d1eb2c779516652b3e6863cc3973d9bfbbef by tbaeder
[clang][sema] Remove unused paramter from VerifyBitField

The ZeroWidth paramter is unused in every call site of VerifyBitField.
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaDecl.cpp
Commit c698189696d33e7304d94cd4212bd81818ea81a0 by gchatelet
[NFC] Format CGBuilder.h
The file was modifiedclang/lib/CodeGen/CGBuilder.h
Commit ad742cf85da105c9374aa24764b30f5ff668e361 by npopov
[DAGCombine] Handle promotion of shift with both operands the same

When promoting a shift, make sure we only fetch the second operand
after promoting the first. Load promotion may replace users of the
old load, and we don't want to be left with a dangling reference to
the old load instruction.

The crashing test case is from https://reviews.llvm.org/D126689#3553212.

Differential Revision: https://reviews.llvm.org/D126886
The file was addedllvm/test/CodeGen/X86/promote-sra-by-itself.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit f5d29c15bf8f70bcab6a697e7c1cbc04607bee95 by Shraiysh.Vaishay
[mlir][OpenMP] Add memory_order clause tests

This patch adds tests for memory_order clause for atomic update and
capture operations. This patch also adds a check for making sure that
the operations inside and omp.atomic.capture region do not specify the
memory_order clause.

Reviewed By: kiranchandramohan, peixin

Differential Revision: https://reviews.llvm.org/D126195
The file was modifiedmlir/test/Dialect/OpenMP/ops.mlir
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/test/Dialect/OpenMP/invalid.mlir
Commit 7ce8c59b383a372d8fd4c44ab3b0dfbcd568d757 by diana.picus
[flang][test-suite] Document need for NO_STOP_MESSAGE environment variable. NFC

When running the llvm-test-suite with flang, we get a lot of failures
because of the output of the `STOP` statement. We can workaround them by
setting `NO_STOP_MESSAGE=1` in the environment. This patch adds a few
words about it to the docs about the Fortran part of the llvm-test-suite.

See also https://reviews.llvm.org/D126360
The file was modifiedflang/docs/FortranLLVMTestSuite.md
Commit f31797f9f1b48f2746e36724d248f6c2d8b9e276 by hahnjo
[cmake] Fix typo in CrossCompile.cmake
The file was modifiedllvm/cmake/modules/CrossCompile.cmake
Commit a29a1a33ac7b567031e5995cc0f17784a1c4be7a by nikolasklauser
[libc++] Fix conjunction/disjunction and mark a few LWG issues as complete

Fixes #54803
Fixes #53133

Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D125221
The file was removedlibcxx/test/std/utilities/meta/meta.logical/disjunction.pass.cpp
The file was modifiedlibcxx/include/CMakeLists.txt
The file was modifiedlibcxx/include/module.modulemap
The file was modifiedlibcxx/test/libcxx/private_headers.verify.cpp
The file was addedlibcxx/include/__type_traits/disjunction.h
The file was addedlibcxx/test/std/utilities/meta/meta.logical/disjunction.compile.pass.cpp
The file was addedlibcxx/test/std/utilities/meta/meta.logical/conjunction.compile.pass.cpp
The file was removedlibcxx/test/std/utilities/meta/meta.logical/conjunction.pass.cpp
The file was modifiedlibcxx/docs/Status/Cxx17Issues.csv
The file was modifiedlibcxx/include/type_traits
The file was addedlibcxx/include/__type_traits/conjunction.h
Commit b50542f21e95800ca1d49b50bddd8e91e0f256fc by mboehme
[clang-tidy] Add missing close quote in release notes.

Sorry for the breakage.
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
Commit 1523e8bb192804df336a308364887e9ad1bef087 by llvmgnsyncbot
[gn build] Port a29a1a33ac7b
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit 8b18572ea7ca7733d8140cb1947079b8704d37db by kristof.beyls
[docs] Fix RST code-block syntax in HowToSetUpLLVMStyleRTTI.rst
The file was modifiedllvm/docs/HowToSetUpLLVMStyleRTTI.rst
Commit b94db7ed7eaf4a3b21f600653a09c55cab77b79f by sguelton
[clang-tidy] Confusable identifiers detection

Detect identifiers that are confusable according to Unicode definition

        http://www.unicode.org/reports/tr39/#Confusable_Detection

and have conflicting scopes.

Differential Revision: https://reviews.llvm.org/D112916
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was addedclang-tools-extra/clang-tidy/misc/ConfusableTable/build_confusable_table.cpp
The file was addedclang-tools-extra/clang-tidy/misc/Homoglyph.h
The file was modifiedclang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
The file was addedclang-tools-extra/docs/clang-tidy/checks/misc-homoglyph.rst
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
The file was addedclang-tools-extra/clang-tidy/misc/Homoglyph.cpp
The file was addedclang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
The file was modifiedclang-tools-extra/clang-tidy/misc/CMakeLists.txt
The file was addedclang-tools-extra/clang-tidy/misc/ConfusableTable/confusables.txt
The file was addedclang-tools-extra/test/clang-tidy/checkers/misc-homoglyph.cpp
Commit 79e3b043e59af643f2540b12a826c695f054e782 by david.green
[AArch64] Add extra addp codegen tests. NFC
The file was modifiedllvm/test/CodeGen/AArch64/arm64-addp.ll
Commit 39f28397e2981238423f5482bef956306ef47c1f by akuegel
[mlir] Fix ClangTidy warning (NFC).

virtual is redundant since the function is already declared 'override'.
The file was modifiedmlir/lib/Parser/AsmParserImpl.h
Commit a5bb4a3b4d3dbf52ad6ec45e6a2557c3ccbe1626 by flo
[VPlan] Replace CondBit with BranchOnCond VPInstruction.

This patch removes CondBit and Predicate from VPBasicBlock. To do so,
the patch introduces a new branch-on-cond VPInstruction opcode to model
a branch on a condition explicitly.

This addresses a long-standing TODO/FIXME that blocks shouldn't be users
of VPValues. Those extra users can cause issues for VPValue-based
analyses that don't expect blocks. Addressing this fixme should allow us
to re-introduce 266ea446ab7476.

The generic branch opcode can also be used in follow-up patches.

Depends on D123005.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D126618
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/icmp-uniforms.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-printing-outer-loop.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-printing.ll
The file was modifiedllvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanValue.h
Commit fe65c567a5694fbd143627a0bb3ac976ecf59c04 by flo
[VPlan] Update failing HCFG unit tests after a5bb4a3b4d3db.
The file was modifiedllvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
Commit 2dde272db767dbc74ebc326b787d25aa82a05b2e by paul.walker
[SVE] Refactor sve-bitcast.ll to include all combinations for legal types.

Patch enables custom lowering for MVT::nxv4bf16 because otherwise
the refactored test file triggers a selection failure.

The reason for the refactoring it to highlight cases where the
generated code is wrong.
The file was modifiedllvm/test/CodeGen/AArch64/sve-bitcast.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit e8e4b741dd108bd0e7f49dd88435519f52d55d54 by benny.kra
[DAGCombiner] Add bf16 to the matrix of types that we don't promote to integer stores

Remove a few stray semicolons while there.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 8df2b1a866800b41984bd7721b244a9821810764 by ty1208chiang
[pp-trace] Print HashLoc in InclusionDirective callback

The HashLoc in InclusionDirective callback is an unused parameter.
Since pp-trace is also used as a test of Clang’s PPCallbacks interface,
add it to the output of pp-trace could avoid some unintended change on
it.

This shuold resolves PR52673

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D125373
The file was modifiedclang-tools-extra/docs/pp-trace.rst
The file was modifiedclang-tools-extra/test/pp-trace/pp-trace-include.cpp
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was modifiedclang-tools-extra/pp-trace/PPCallbacksTracker.cpp
Commit 180bae08a04d4dc724cb5e6f2ea9df8641a3f657 by thakis
[gn build] (manually) port b94db7ed7eaf (Confusables.inc)
The file was addedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/ConfusableTable/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn
The file was modifiedclang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
Commit 6b7c18639021cd3da69c6c2812e189b9cd4cf34f by benny.kra
[VPlan] Inline variable into assertion. NFC.

Avoids a warning in release builds
llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp:311:14: warning: unused variable 'BrCond' [-Wunused-variable]
      Value *BrCond = Br->getCondition();
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp