SuccessChanges

Summary

  1. [InstCombine] Regenerate cast tests. NFC. (details)
  2. [X86] Use inlineasm flag output for the _bittest* intrinsics. (details)
  3. [mlir] [VectorOps] Relaxed restrictions on vector.reduction types even more (details)
  4. Revert "Revert "[AArch64][GlobalISel] Add selection support for <8 x s16>  G_INSERT_VECTOR_ELT with GPR scalar."" (details)
  5. [lldb] Add print_function import (details)
  6. Fix a think-o with the numerical suffixes in the docs for init_priority. (details)
  7. [gn build] Re-run CompletionModelCodegen when input json files change (details)
  8. [CMake][AIX] Limit tools in external project build (details)
  9. [GlobalISel] Add support for lowering of vector G_SELECT and use for AArch64. (details)
  10. [X86] Add tests for D87883. NFC (details)
  11. [X86] Add support for calling SimplifyDemandedBits on the input of PDEP with a constant mask. (details)
  12. [libc++] Fix constexpr dynamic allocation on GCC 10 (details)
  13. [libcxx] Don't pass -s to libtool (details)
  14. [mlir][shape] Make conversion passes more consistent. (details)
  15. [EHStreamer] Simplify sharedTypeIDs with std::mismatch (details)
  16. [CVP] Allow two transforms in one invocation (details)
  17. Guard `find_library(tensorflow_c_api ...)` by checking for TENSORFLOW_C_LIB_PATH to be set by the user (details)
  18. [clang] Selectively ena/disa-ble format-insufficient-args warning (details)
  19. [scudo][standalone] Remove unused atomic_compare_exchange_weak (details)
Commit 2f768a68a148a73bf1f52b160a28b9f77c6d830e by llvm-dev
[InstCombine] Regenerate cast tests. NFC.
The file was modifiedllvm/test/Transforms/InstCombine/cast.ll
Commit 288c5776c9d3cb14abe1c86f961c8ff166772d28 by craig.topper
[X86] Use inlineasm flag output for the _bittest* intrinsics.

Instead of expliciting emitting a setc in the inline asm instructions,
we can use flag output. This allows the backend to use the flag
directly if it is needed by a branch. Previously we needed a test
instruction to convert the register back to a flag.

If the flag can't be used directly, the backend will emit a setcc.

Differential Revision: https://reviews.llvm.org/D87888
The file was modifiedclang/test/CodeGen/bittest-intrin.c
The file was addedllvm/test/CodeGen/X86/bittest-intrin.ll
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit e9628955f5e965b0a60b8df3c731fc6bfa87ad20 by ajcbik
[mlir] [VectorOps] Relaxed restrictions on vector.reduction types even more

Recently, restrictions on vector reductions were made more relaxed by
accepting any width signless integer and floating-point. This CL relaxes
the restriction even more by including unsigned and signed integers.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D88442
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-reductions-si4.mlir
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-reductions-i4.mlir
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-reductions-ui4.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
Commit 5aa56b242951ab0f0181386ea58509f19b09206e by Amara Emerson
Revert "Revert "[AArch64][GlobalISel] Add selection support for <8 x s16>  G_INSERT_VECTOR_ELT with GPR scalar.""

This isn't a real with the codegen, it's a previously known bug in clang which
causes non-deterministic failures due to garbage bits in undef registers being
used in saturating instructions.

I'm disabling the result checking for the test until this issue is resolved.

This reverts commit 6c8168324b5329c94fe7e8f9a1619802091b9bec.
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-insert-vector-elt.mir
Commit 974551d37da8352c22fd849d19cb8fb1facff680 by Jonas Devlieghere
[lldb] Add print_function import
The file was modifiedlldb/docs/conf.py
Commit e7549dafcd33ced4280a81ca1d1ee4cc78ed253f by aaron
Fix a think-o with the numerical suffixes in the docs for init_priority.
The file was modifiedclang/include/clang/Basic/AttrDocs.td
Commit d89735133582ebca482e94bc2710733a09dfb643 by thakis
[gn build] Re-run CompletionModelCodegen when input json files change
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
Commit 25affb04aab7ad55bd7c0dc95e8c2d3973ab8f6d by daltenty
[CMake][AIX] Limit tools in external project build

This is a follow on to D85329 which disabled some llvm tools in the
runtimes build due to XCOFF64 limitations. This change disables them
in other external project builds as well, when no list of tools is
specified in the arguments.

Reviewed By: hubert.reinterpretcast, stevewan

Differential Revision: https://reviews.llvm.org/D88310
The file was modifiedllvm/cmake/modules/LLVMExternalProjectUtils.cmake
Commit 082321909e514d3cb50adedfdeb4e8de22df9113 by Amara Emerson
[GlobalISel] Add support for lowering of vector G_SELECT and use for AArch64.

The lowering is a port of the SDAG expansion.

Differential Revision: https://reviews.llvm.org/D88364
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
The file was modifiedllvm/test/CodeGen/AArch64/arm64-vabs.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-select.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit e5ef523ee46895ab5c75260b420d608f08002d97 by craig.topper
[X86] Add tests for D87883. NFC
The file was modifiedllvm/test/CodeGen/X86/bmi2.ll
Commit e53196b1e862902c74d83f0ce6f3578b1326f23d by craig.topper
[X86] Add support for calling SimplifyDemandedBits on the input of PDEP with a constant mask.

We can do several optimizations for PDEP using computeKnownBits and SimplifyDemandedBits

-If the MSBs of the output aren't demanded, those MSBs of the mask input aren't demanded either. We need to keep the most significant demanded bit of the mask and any mask bits before it.
-The number of possible ones in the mask determines how many bits of the lsbs of the other operand are demanded. Any bits of the mask we don't demand by the previous rule should not be counted.
-The result will have zeros in any position that the mask is zero.
-Since non-mask input bits can only be output in the original position or a higher bit position, the result will have at least as many trailing zeroes as the non-mask input.

Differential Revision: https://reviews.llvm.org/D87883
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/bmi2-x86_64.ll
The file was modifiedllvm/test/CodeGen/X86/bmi2.ll
Commit d092c912885cc152bef27019525b8fd0761aaaa2 by Louis Dionne
[libc++] Fix constexpr dynamic allocation on GCC 10

We're technically not allowed by the Standard to call ::operator new in
constexpr functions like __libcpp_allocate. Clang doesn't seem to complain
about it, but GCC does.
The file was modifiedlibcxx/include/memory
The file was modifiedlibcxx/test/std/utilities/memory/specialized.algorithms/specialized.construct/construct_at.pass.cpp
The file was modifiedlibcxx/include/new
The file was modifiedlibcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp
Commit 2d657d1bd7f1e45722ced24e1da897ba5e87ab7a by phosek
[libcxx] Don't pass -s to libtool

This flag is the default in libtool on Darwin, and it's not supported
by llvm-libtool-darwin causing a build failure.

Differential Revision: https://reviews.llvm.org/D88449
The file was modifiedlibcxx/utils/merge_archives.py
Commit a975be0e00a12fdf09ffc9127825321c79813f33 by silvasean
[mlir][shape] Make conversion passes more consistent.

- use select-ops to make the lowering simpler
- change style of FileCheck variables names to be consistent
- change some variable names in the code to be more explicit

Differential Revision: https://reviews.llvm.org/D88258
The file was modifiedmlir/test/Conversion/ShapeToStandard/convert-shape-constraints.mlir
The file was modifiedmlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
The file was modifiedmlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
The file was modifiedmlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
Commit bd08a87cfede308f040d79b45245213afd87959a by i
[EHStreamer] Simplify sharedTypeIDs with std::mismatch

(Note that EMStreamer.cpp is largely under tested. The only test checking the prefix sharing is CodeGen/WebAssembly/eh-lsda.ll)
The file was modifiedllvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
Commit e46d74b58922a427562552464d798448520e4928 by listmail
[CVP] Allow two transforms in one invocation

For a call site which had both constant deopt operands and nonnull arguments, we were missing the opportunity to recognize the later by bailing early.

This is somewhat of a speculative fix.  Months ago, I'd had a private report of performance and compile time regressions from the deopt operand folding.  I never received a test case.  However, the only possibility I see was that after that change CVP missed the nonnull fold, and we end up with a pass ordering/missed simplification issue.  So, since it's a real issue, fix it and hope.
The file was modifiedllvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/deopt.ll
Commit e72d792c147ee506e337401e20c0f23042cc43fe by joker.eph
Guard `find_library(tensorflow_c_api ...)` by checking for TENSORFLOW_C_LIB_PATH to be set by the user

Also have CMake fails if the user provides a TENSORFLOW_C_LIB_PATH but
we can't find TensorFlow at this path.

At the moment the CMake script tries to figure if TensorFlow is
available on the system and enables support for it. This is in general
not desirable to customize build features this way and instead it is
preferable to let the user opt-in explicitly into the features they want
to enable. This is in line with other optional external dependencies
like Z3.
There are a few reasons to this but amongst others:
- reproducibility: making features "magically" enabled based on whether
  we find a package on the system or not makes it harder to handle bug
  reports from users.
- user control: they can't have TensorFlow on the system and build LLVM
  without TensorFlow right now. They also would suddenly distribute LLVM
  with a different set of features unknowingly just because their build
  machine environment would change subtly.

Right now this is motivated by a user reporting build failures on their system:

.../mesa-git/llvm-git/src/llvm-project/llvm/lib/Analysis/TFUtils.cpp:23:10: fatal error: tensorflow/c/c_api.h: No such file or directory
   23 | #include "tensorflow/c/c_api.h"
      |          ^~~~~~

It looks like we detected TensorFlow at configure time but couldn't set all the paths correctly.

Differential Revision: https://reviews.llvm.org/D88371
The file was modifiedllvm/CMakeLists.txt
Commit 1e86d637eb4f88e03fcd4b9fd78192487dc2a302 by Jan Korous
[clang] Selectively ena/disa-ble format-insufficient-args warning

Differential Revision: https://reviews.llvm.org/D87176
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/Misc/warning-wall.c
The file was addedclang/test/Sema/warn-printf-insufficient-data-args.c
Commit f668a84b58dcd816656236d7ba7e820dce52e7f8 by kostyak
[scudo][standalone] Remove unused atomic_compare_exchange_weak

`atomic_compare_exchange_weak` is unused in Scudo, and its associated
test is actually wrong since the weak variant is allowed to fail
spuriously (thanks Roland).

This lead to flakes such as:
```
[ RUN      ] ScudoAtomicTest.AtomicCompareExchangeTest
../../zircon/third_party/scudo/src/tests/atomic_test.cpp:98: Failure: Expected atomic_compare_exchange_weak(reinterpret_cast<T *>(&V), &OldVal, NewVal, memory_order_relaxed) is true.
    Expected: true
    Which is: 01
    Actual  : atomic_compare_exchange_weak(reinterpret_cast<T *>(&V), &OldVal, NewVal, memory_order_relaxed)
    Which is: 00
../../zircon/third_party/scudo/src/tests/atomic_test.cpp:100: Failure: Expected atomic_compare_exchange_weak( reinterpret_cast<T *>(&V), &OldVal, NewVal, memory_order_relaxed) is false.
    Expected: false
    Which is: 00
    Actual  : atomic_compare_exchange_weak( reinterpret_cast<T *>(&V), &OldVal, NewVal, memory_order_relaxed)
    Which is: 01
../../zircon/third_party/scudo/src/tests/atomic_test.cpp:101: Failure: Expected OldVal == NewVal.
    Expected: NewVal
    Which is: 24
    Actual  : OldVal
    Which is: 42
[  FAILED  ] ScudoAtomicTest.AtomicCompareExchangeTest (0 ms)
[----------] 2 tests from ScudoAtomicTest (1 ms total)
```

So I am removing this, if someone ever needs the weak variant, feel
free to add it back with a test that is not as terrible. This test was
initially ported from sanitizer_common, but their weak version calls
the strong version, so it works for them.

Differential Revision: https://reviews.llvm.org/D88443
The file was modifiedcompiler-rt/lib/scudo/standalone/atomic_helpers.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/atomic_test.cpp