SuccessChanges

Summary

  1. [AArch64][GlobalISel] Enable extending loads combines post-legalization. (details)
  2. [X86] Remove MMX isel patterns containing (x86mmx (scalar_to_vector (i32))). (details)
  3. [libc] Add implementation of call_once from threads.h. (details)
  4. [CodeGen] Add support for extracting elements of scalable vectors (details)
  5. [SVE] Fix warnings in SelectInst::areInvalidOperands (details)
  6. [SVE] Remove getNumElements() warnings in InstCombiner::visitBitCast (details)
  7. [CMake] Pass CLANG_VENDOR variables into later stages (details)
  8. libclc: update website url (details)
  9. New intrinsic @llvm.get.active.lane.mask() (details)
  10. [AST][RecoveryExpr] Make DeduceAutoType fail if the auto is deduced from recovery exprs. (details)
  11. [TTI] New target hook emitGetActiveLaneMask (details)
  12. [VE] Implements minimum MC layer for VE (4/4) (details)
  13. [AMDGPU] Use numbers::pi instead of M_PI. NFC. (details)
  14. [AMDGPU] Better use of llvm::numbers (details)
  15. [MLIR][BufferPlacement] Support functions that return Memref typed results (details)
  16. Avoid O_CLOEXEC to allow building on older Linux (RHEL5) (details)
  17. [lldb][NFC] Remove a std::string->C string->StringRef conversion in ClangUserExpression (details)
  18. [lldb] Make "inline" tests more configurable (details)
  19. Do not list adb devices when a device id is given (details)
  20. [llvm-readobj][test] - unwind.test: add comments, document the current behavior. (details)
  21. [libc++] Fix the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT setting (details)
  22. Unbreak the build of mlir-cuda-runner (details)
Commit a0c90b5b2ad6a81e8aded5ad59cc25ff58464bcf by Amara Emerson
[AArch64][GlobalISel] Enable extending loads combines post-legalization.

During legalization we can end up with extends of loads, which in the case of
zexts causes us to not hit tablegen imported patterns.

The caveat here is that we don't want anyext load forming, since some variants
are illegal. This change also prevents the combine from creating any illegal
loads.

Differential Revision: https://reviews.llvm.org/D80458
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-extending-loads.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64PostLegalizerCombiner.cpp
Commit 17ed6dcb0c96ac6a6fd5021b326213dbd5fef250 by craig.topper
[X86] Remove MMX isel patterns containing (x86mmx (scalar_to_vector (i32))).

I don't think we can make such a node. I don't think
x86_mmx is considered a vector for the check in getNode.
The file was modifiedllvm/lib/Target/X86/X86InstrMMX.td
Commit 0baf0e8cfc1845ef92d397c1ae43793bf9e6aaad by sivachandra
[libc] Add implementation of call_once from threads.h.

Reviewers: abrachet, maskray

Differential Revision: https://reviews.llvm.org/D79828
The file was addedlibc/src/threads/call_once.h
The file was modifiedlibc/src/threads/linux/CMakeLists.txt
The file was modifiedlibc/lib/CMakeLists.txt
The file was modifiedlibc/config/linux/api.td
The file was addedlibc/test/src/threads/call_once_test.cpp
The file was modifiedlibc/test/src/threads/CMakeLists.txt
The file was modifiedlibc/spec/stdc.td
The file was modifiedlibc/src/threads/CMakeLists.txt
The file was addedlibc/src/threads/linux/call_once.cpp
Commit b147b88c8432cdc14a3238925dbfb8d55be32932 by david.sherwood
[CodeGen] Add support for extracting elements of scalable vectors

I have tried to ensure that SelectionDAG and DAGCombiner do
sensible things for scalable vectors, and added support for a
limited number of simple folds. Codegen support for the vector
extract patterns have also been added to the AArch64 backend.

New vector extract tests have been added here:

  CodeGen/AArch64/sve-extract-element.ll

and I have also added new folds using inserts and extracts here:

  CodeGen/AArch64/sve-insert-element.ll

Differential Revision: https://reviews.llvm.org/D80208
The file was addedllvm/test/CodeGen/AArch64/sve-extract-element.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-element.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
Commit 9c0ef044beb4850ad9626cb81a1ede4f3bbda4a7 by david.sherwood
[SVE] Fix warnings in SelectInst::areInvalidOperands

We should be comparing the element counts rather than the
numbers of elements.

Differential Revision: https://reviews.llvm.org/D80634
The file was addedllvm/test/CodeGen/AArch64/sve-bad-select.ll
The file was modifiedllvm/lib/IR/Instructions.cpp
Commit f254f1d94e8d0070b2d006a3d1e7ee6eeae0aaa7 by david.sherwood
[SVE] Remove getNumElements() warnings in InstCombiner::visitBitCast

Whilst trying to compile this test to assembly:

  CodeGen/aarch64-sve-intrinsics/acle_sve_reinterpret.c

I discovered some warnings were firing in InstCombiner::visitBitCast
due to calls to getNumElements() for scalable vector types. These
calls only really made sense for fixed width vectors so I have fixed
up the code appropriately.

Differential Revision: https://reviews.llvm.org/D80559
The file was addedllvm/test/Transforms/InstCombine/AArch64/sve-bitcast.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit ca467542eecfc621eea7fefb3c7e3849c6b43ac7 by sylvestre
[CMake] Pass CLANG_VENDOR variables into later stages

We are already passing CLANG_VERSION_* & PACKAGE_VENDOR
The file was modifiedclang/CMakeLists.txt
Commit a3418631e8aa0941b8b57ec2fc3b8d0c7db493be by sylvestre
libclc: update website url

old link is dead
The file was modifiedlibclc/README.TXT
Commit 7fb8a40e5220d6d4efa14c15f92b6f28ba1b18f7 by sjoerd.meijer
New intrinsic @llvm.get.active.lane.mask()

This is split off from D79100 and:
- adds a intrinsic description/definition for @llvm.get.active.lane.mask(), and
- describe its semantics in LangRef.

As described (in more detail) in its LangRef section, it is semantically
equivalent to an icmp with the vector induction variable and the back-edge
taken count, and generates a mask of active/inactive vector lanes.

It will have several use cases. First, it will be used by the
ExpandVectorPredication pass for the VP intrinsics, to expand VP intrinsics for
scalable vectors on targets that do not support the `%evl` parameter, see
D78203.

Also, this is part of, and essential for our ARM MVE tail-predication story:
- this intrinsic will be emitted by the LoopVectorizer in D79100, when
  the scalar epilogue is tail-folded into the vector body. This new intrinsic
  will generate the predicate for the masked loads/stores, and it takes the
  back-edge taken count as an argument. The back-edge taken count represents the
  number of elements processed by the loop, which we need to setup MVE
  tail-predication.
- Emitting the intrinsic is controlled by a new TTI hook, see D80597.
- We pick up this new intrinsic in an ARM MVETailPredication backend pass, see
  D79175, and convert it to a MVE target specific intrinsic/instruction to
  create a tail-predicated loop.

Differential Revision: https://reviews.llvm.org/D80596
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/docs/LangRef.rst
The file was addedllvm/test/Verifier/get-active-lane-mask.ll
Commit 82bb57c11d8ccb4e1b0f420f4388dd6553bbc57a by hokein.wu
[AST][RecoveryExpr] Make DeduceAutoType fail if the auto is deduced from recovery exprs.

Summary:
With recovery-ast, we will get an undeduced `auto` return type for
"auto foo()->undef()" function declaration, the function decl still keeps
valid, it is dangerous, and breaks assumptions in clang, and leads crashes.

This patch invalidates these functions, if we deduce autos from the
return rexpression, which is similar to auto VarDecl.

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80221
The file was modifiedclang/lib/Sema/SemaTemplateDeduction.cpp
The file was modifiedclang/test/AST/ast-dump-recovery.cpp
The file was addedclang/test/AST/ast-dump-invalid-auto-return-funcs.cpp
The file was modifiedclang/test/Sema/invalid-bitwidth-expr.mm
The file was modifiedclang/lib/Sema/SemaStmt.cpp
Commit 7480ccbfc9d258a38eb99bbfccc6511e6ae10b70 by sjoerd.meijer
[TTI] New target hook emitGetActiveLaneMask

This is split off from D79100 and adds a new target hook emitGetActiveLaneMask
that can be queried to check if the intrinsic @llvm.get.active.lane.mask() is
supported by the backend and if it should be emitted for a given loop.

See also commit rG7fb8a40e5220 and its commit message for more details/context
on this new intrinsic.

Differential Revision: https://reviews.llvm.org/D80597
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
Commit 0e0907fa0e257ba63d6f820eafbf2079502153ed by simon.moll
[VE] Implements minimum MC layer for VE (4/4)

Summary:
This patch includes following items.

- Adds AsmParser and minimum AsmBackend/ELFObjectWriter/MCCodeEmitter to
   support only LEA instruction in order to reduce the size of this patch.
- Adds regression test of MC layer for a LEA instruction.
- Relocations are not supported this time to reduce the size of this patch.

Differential Revision: https://reviews.llvm.org/D79546
The file was addedllvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
The file was modifiedllvm/lib/Target/VE/LLVMBuild.txt
The file was addedllvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
The file was addedllvm/test/MC/VE/lit.local.cfg
The file was addedllvm/lib/Target/VE/MCTargetDesc/VEMCCodeEmitter.cpp
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
The file was addedllvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
The file was addedllvm/test/MC/VE/LEA.s
The file was modifiedllvm/lib/Target/VE/CMakeLists.txt
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/CMakeLists.txt
The file was modifiedllvm/lib/Target/VE/VE.td
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h
The file was addedllvm/lib/Target/VE/AsmParser/LLVMBuild.txt
The file was modifiedllvm/lib/Target/VE/VEInstrInfo.td
The file was addedllvm/lib/Target/VE/AsmParser/CMakeLists.txt
Commit 036d4b0dbfd1bb5f960c620ff899669d85e62e08 by jay.foad
[AMDGPU] Use numbers::pi instead of M_PI. NFC.
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit b28d038ff34dd54ce8eb9fe83506cc3742e6b85a by jay.foad
[AMDGPU] Better use of llvm::numbers

Tweak a few constant expressions involving numbers::pi etc to avoid
rounding errors. NFCI though it's possible some of these will now be
more accurate in the last bit.
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit 7a3a2535854c84b1c8f6b0a2f2677e89b0e1a250 by ehsan.nadjaran_toosi
[MLIR][BufferPlacement] Support functions that return Memref typed results

Buffer placement can now operates on functions that return buffers. These
buffers escape from the deallocation phase of buffer placement.

Differential Revision: https://reviews.llvm.org/D80696
The file was modifiedmlir/include/mlir/Transforms/BufferPlacement.h
The file was modifiedmlir/test/lib/Transforms/TestBufferPlacement.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
The file was modifiedmlir/test/Transforms/buffer-placement.mlir
The file was modifiedmlir/test/Transforms/buffer-placement-preparation.mlir
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp
Commit 058f5f6fd813d1ee1480497394d6fd44e65ec62b by Vitaly Buka
Avoid O_CLOEXEC to allow building on older Linux (RHEL5)

Summary:
See https://github.com/google/sanitizers/issues/1253.

Small patch to enable compilation on (ancient) Red Hat Enterprise Linux 5.

Reviewers: kcc, vitalybuka

Reviewed By: vitalybuka

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D80648
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_posix.cpp
Commit 5f0267984792429d7b9ac574c17566b98527576e by Raphael Isemann
[lldb][NFC] Remove a std::string->C string->StringRef conversion in ClangUserExpression
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
Commit 2c22c1473569352efa9326aa165cc451d39da015 by pavel
[lldb] Make "inline" tests more configurable

Summary:
This patch adds two new arguments to the MakeInlineTest function. The
main motivation is a follow-up patch I'm preparing, but they seem
generally useful.

The first argument allows the user to specify the "build dictionary".
With this argument one can avoid the need to provide a custom Makefile
if all he needs is to override a couple of make variables. This hooks in
neatly into the existing dictionary support for non-inline tests.

The second argument specifies the name of the test. This could be used
to provide better names to the generated test classes, but it's mainly
useful in conjuction with the first argument: now that we can specify a
custom build dictionary, it may sometimes make sense to run the same
test twice with different build configurations. To achieve that, we need
to give the two tests different names, and this argument achieves that.

The usage of the arguments is demonstrated via TestBasicEntryValues.py.

Reviewers: vsk, JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D80518
The file was modifiedlldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py
The file was removedlldb/test/API/functionalities/param_entry_vals/basic_entry_values/Makefile
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbinline.py
Commit 7ff2de4f0c60c5d13880440e85ef8edc78482a2f by pavel
Do not list adb devices when a device id is given

Summary:
On Android, this method gets called twice: first when establishing
a host-server connection, then when attaching to a process id.

Each call takes several seconds to finish (especially slower on Windows)
and eliminating the call for the typical case improves latency significantly.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D79586
The file was modifiedlldb/unittests/Platform/CMakeLists.txt
The file was addedlldb/unittests/Platform/Android/AdbClientTest.cpp
The file was addedlldb/unittests/Platform/Android/CMakeLists.txt
The file was modifiedlldb/source/Plugins/Platform/Android/AdbClient.cpp
Commit 1bfc58e6557cd3f3c310de214f316469c20c1476 by grimar
[llvm-readobj][test] - unwind.test: add comments, document the current behavior.

Here I've added comments, added testing for llvm-readelf and documented
the behavior that we already have.

It was discussed in the D80380 thread that we want to improve the
"p_memsz does not match p_filesz for GNU_EH_FRAME" message reported
(and probably convert error to a warning). This patch is a preparation
for that.

Differential revision: https://reviews.llvm.org/D80635
The file was modifiedllvm/test/tools/llvm-readobj/ELF/unwind.test
Commit d0fcdcd28f95d699b27d2026ede964a7f9cff9dd by Louis Dionne
[libc++] Fix the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT setting

When the __config_site header is generated, but LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
wasn't specified, _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT would be defined
to 0, which was the NonUnique RTTI comparison implementation. The intent
was to use the Unique RTTI comparison implementation in that case, which
caused https://llvm.org/PR45549.

Instead, use a proper "switch" to select the RTTI comparison implementation.
Note that 0 can't be used as a value, because that is treated the same
by CMake as a variable that is just not defined.

Differential Revision: https://reviews.llvm.org/D80037
The file was modifiedlibcxx/CMakeLists.txt
The file was modifiedlibcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
The file was modifiedlibcxx/cmake/caches/Apple.cmake
The file was modifiedlibcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
The file was modifiedlibcxx/docs/BuildingLibcxx.rst
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
The file was modifiedlibcxx/include/__config_site.in
The file was modifiedlibcxx/include/typeinfo
Commit b9bb3ad3ed3b13607d15472a0b881da9fb00fc03 by benny.kra
Unbreak the build of mlir-cuda-runner
The file was modifiedmlir/tools/mlir-cuda-runner/CMakeLists.txt