SuccessChanges

Summary

  1. [llvm-readobj/elf] - Simplify and refine the implementation which dumps .stack_sizes (details)
  2. [X86] detectAVGPattern - accept non-pow2 vectors by padding. (details)
  3. [MVE] fix typo in llvm debug message. NFC. (details)
  4. [Transforms][Coroutines] Add missing header path to CMakeLists.txt (details)
  5. [SelectionDAG] Remove unused FP constant in getNegatedExpression (details)
  6. [ARM] Corrected condition in isSaturatingConditional (details)
  7. [X86] Update SSE/AVX integer MINMAX intrinsics to emit llvm.smax.* etc. (PR46851) (details)
  8. Revert "[InstCombine] Simplify select operand based on equality condition" (details)
  9. [mlir][integration_test] Linalg Conv folder renamed to CPU (details)
  10. [mlir] check for failures when packing function sigunatures in std->llvm conversion (details)
  11. Recommit "[ConstraintSystem] Add helpers to deal with linear constraints." (details)
  12. SelectionDAGBuilder.h - remove unnecessary includes. NFCI. (details)
  13. StatepointLowering.cpp - remove unnecessary includes. NFCI. (details)
  14. SpillPlacement.cpp - remove unnecessary includes. NFCI. (details)
  15. Revert "RegAllocFast: Record internal state based on register units" (details)
  16. [lldb/cmake] Fix testing support library dependencies (details)
  17. [lldb] Improve qemu interop for aarch64 (details)
Commit bccd2ec3e216fed04c46df7077462165435703a1 by grimar
[llvm-readobj/elf] - Simplify and refine the implementation which dumps .stack_sizes

Our implementation of stack sizes section dumping heavily uses `ELFObjectFile<ELFT>`,
while the rest of the code uses `ELFFile<ELFT>`.

That APIs are very different. `ELFObjectFile<ELFT>` is very generic
and has `SectionRef`, `RelocationRef`, `SymbolRef` and other generic concepts.
The `ELFFile<ELFT>` class works directly with `Elf_Shdr`, `Elf_Rel[a]`, `Elf_Sym` etc,
what is probably much cleaner for ELF dumper.

Also, `ELFObjectFile<ELFT>` API does not always provide a way to check
for possible errors. E.g. the implementation of `symbol_end()` does not verify the `sh_size`:

```
template <class ELFT>
basic_symbol_iterator ELFObjectFile<ELFT>::symbol_end() const {
  const Elf_Shdr *SymTab = DotSymtabSec;
  if (!SymTab)
    return symbol_begin();
  DataRefImpl Sym = toDRI(SymTab, SymTab->sh_size / sizeof(Elf_Sym));
  return basic_symbol_iterator(SymbolRef(Sym, this));
}
```
There are many other examples which makes me thing we might win from
switching to `ELFFile<ELFT>` API, where we heavily validate an input data already.

This patch is the first step in this direction. I've converted the large portion of the code
to use `ELFFile<ELFT>`.

Differential revision: https://reviews.llvm.org/D87362
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit fc446935d724e87be515eb465293d82e040eb571 by llvm-dev
[X86] detectAVGPattern - accept non-pow2 vectors by padding.

Drop the pow2 vector limitation for AVG generation by padding the vector to the next pow2, creating the PAVG nodes and then extracting the final subvector.

Fixes some poor codegen that has been annoying me for years.....
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/avg.ll
Commit b4b1b84106a03d7b6374090bc0ff04b3a77a0862 by sjoerd.meijer
[MVE] fix typo in llvm debug message. NFC.
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
Commit 5f13d6c1eef7fa4264d143af6e7bafbb74937ccd by llvm-dev
[Transforms][Coroutines] Add missing header path to CMakeLists.txt

Helps Visual Studio check include dependencies.
The file was modifiedllvm/lib/Transforms/Coroutines/CMakeLists.txt
Commit 2508ef014e8b01006de4e5ee6fd451d1f68d550f by qiucofan
[SelectionDAG] Remove unused FP constant in getNegatedExpression

960cbc53 immediately removes nodes that won't be used to avoid
compilation time explosion. This patch adds the removal to constants to
fix PR47517.

Reviewed By: RKSimon, steven.zhang

Differential Revision: https://reviews.llvm.org/D87614
The file was addedllvm/test/CodeGen/X86/pr47517.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit 1119bf95be94950da602b268dc96dbb2110cbe15 by meera.nakrani
[ARM] Corrected condition in isSaturatingConditional

Fixed a small error in an if condition to prevent usat/ssat being generated if (upper constant + 1) is not a
power of 2.
The file was modifiedllvm/test/CodeGen/ARM/usat.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
Commit 9eab73fa17f5920178a87ee8a5021f4fd6f0f5ef by llvm-dev
[X86] Update SSE/AVX integer MINMAX intrinsics to emit llvm.smax.* etc. (PR46851)

We're now getting close to having the necessary analysis/combines etc. for the new generic llvm smax/smin/umax/umin intrinsics.

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

Differential Revision: https://reviews.llvm.org/D87603
The file was modifiedclang/test/CodeGen/X86/avx512vl-builtins.c
The file was modifiedclang/test/CodeGen/X86/avx512f-builtins.c
The file was modifiedllvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
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/X86/sse41-builtins.c
The file was modifiedclang/test/CodeGen/X86/avx512-reduceMinMaxIntrin.c
The file was modifiedclang/test/CodeGen/X86/avx2-builtins.c
The file was modifiedclang/test/CodeGen/X86/avx512vlbw-builtins.c
The file was modifiedclang/test/CodeGen/X86/sse2-builtins.c
The file was modifiedclang/test/CodeGen/X86/avx512bw-builtins.c
The file was modifiedllvm/test/CodeGen/X86/sse41-intrinsics-fast-isel.ll
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
Commit b768546fe0cc1d320857a6e080d4c796efb0c00c by benny.kra
Revert "[InstCombine] Simplify select operand based on equality condition"

This reverts commit cfff88c03cf9e9b72906a41fd11e06721d54f293. Sends
instcombine into an infinite loop.

```
define i1 @foo(i32 %arg, i32 %arg1) {
bb:
  %tmp = udiv i32 %arg, %arg1
  %tmp2 = mul nsw i32 %tmp, %arg1
  %tmp3 = icmp eq i32 %tmp2, %arg
  %tmp4 = select i1 %tmp3, i32 %tmp, i32 undef
  %tmp5 = icmp sgt i32 %tmp4, 255
  ret i1 %tmp5
}
```
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstCombine/rem.ll
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Commit c20852300a35a33cb6bf47028f3c95a2640dab9f by limo
[mlir][integration_test] Linalg Conv folder renamed to CPU

Changing directory name to reflect naming convention discussed here:
https://llvm.discourse.group/t/vectorops-rfc-add-suite-of-integration-tests-for-vector-dialect-operations/1213

Differential Revision: https://reviews.llvm.org/D87678
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-1d-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-2d-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-2d-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-3d-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-3d-ndhwc-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-1d-nwc-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-2d-nhwc-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-2d-nchw-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-1d-ncw-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-2d-nhwc-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-2d-nchw-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-3d-ncdhw-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-3d-ncdhw-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-1d-call.mlir
The file was addedmlir/integration_test/Dialect/Linalg/CPU/test-conv-3d-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-1d-ncw-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-1d-nwc-call.mlir
The file was removedmlir/integration_test/Dialect/Linalg/Conv/test-conv-3d-ndhwc-call.mlir
Commit 967c7b6936a66878919568b94643c942cc7de69e by zinenko
[mlir] check for failures when packing function sigunatures in std->llvm conversion

When packing function results into a structure during the standard-to-llvm
dialect conversion, do not assume the conversion was successful and propagate
nullptr as error state.

Fixes PR45184.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D87605
The file was modifiedmlir/test/Conversion/StandardToLLVM/invalid.mlir
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Commit cd4edf94cd43754954aff0ddabd704de0f8f7ac0 by flo
Recommit "[ConstraintSystem] Add helpers to deal with linear constraints."

This patch recommits "[ConstraintSystem] Add helpers to deal with linear constraints."
(it reverts the revert commit 8da6ae4ce1b686c5c13698e4c5ee937811fda6f7).

The reason for the revert was using __builtin_multiply_overflow, which
is not available for all compilers. The patch has been updated to use
MulOverflow from MathExtras.h
The file was addedllvm/include/llvm/Analysis/ConstraintSystem.h
The file was addedllvm/lib/Analysis/ConstraintSystem.cpp
The file was addedllvm/unittests/Analysis/ConstraintSystemTest.cpp
The file was modifiedllvm/lib/Analysis/CMakeLists.txt
The file was modifiedllvm/unittests/Analysis/CMakeLists.txt
The file was addedllvm/utils/convert-constraint-log-to-z3.py
Commit bee79cdcc6aa855f4abcaa1f7e7f9df54538496b by llvm-dev
SelectionDAGBuilder.h - remove unnecessary includes. NFCI.

Reduce to forward declarations and move implicit dependencies down to the cpp files.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit 1abb4461ea03f1166c13c4dd5fa349d41d02be6a by llvm-dev
StatepointLowering.cpp - remove unnecessary includes. NFCI.

These are all directly included in StatepointLowering.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
Commit 6c1f2a34fbcaa57c3dc0de3f9e4da58da7f328b6 by llvm-dev
SpillPlacement.cpp - remove unnecessary includes. NFCI.

These are all directly included in SpillPlacement.h
The file was modifiedllvm/lib/CodeGen/SpillPlacement.cpp
Commit a21387c65470417c58021f8d3194a4510bb64f46 by hans
Revert "RegAllocFast: Record internal state based on register units"

This seems to have caused incorrect register allocation in some cases,
breaking tests in the Zig standard library (PR47278).

As discussed on the bug, revert back to green for now.

> Record internal state based on register units. This is often more
> efficient as there are typically fewer register units to update
> compared to iterating over all the aliases of a register.
>
> Original patch by Matthias Braun, but I've been rebasing and fixing it
> for almost 2 years and fixed a few bugs causing intermediate failures
> to make this patch independent of the changes in
> https://reviews.llvm.org/D52010.

This reverts commit 66251f7e1de79a7c1620659b7f58352b8c8e892e, and
follow-ups 931a68f26b9a3de853807ffad7b2cd0a2dd30922
and 0671a4c5087d40450603d9d26cf239f1a8b1367e. It also adjust some
test expectations.
The file was modifiedllvm/test/CodeGen/AMDGPU/indirect-addressing-term.ll
The file was modifiedllvm/test/CodeGen/AArch64/popcount.ll
The file was modifiedllvm/test/CodeGen/X86/pr1489.ll
The file was modifiedllvm/test/CodeGen/X86/swift-return.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/partial-sgpr-to-vgpr-spills.ll
The file was modifiedllvm/test/CodeGen/Mips/atomic-min-max.ll
The file was modifiedllvm/test/CodeGen/X86/pr27591.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/wwm-reserved.ll
The file was modifiedllvm/lib/CodeGen/RegAllocFast.cpp
The file was modifiedllvm/test/CodeGen/Mips/implicit-sret.ll
The file was modifiedllvm/test/CodeGen/SPARC/fp16-promote.ll
The file was modifiedllvm/test/CodeGen/X86/pr32241.ll
The file was modifiedllvm/test/CodeGen/X86/regalloc-fast-missing-live-out-spill.mir
The file was modifiedllvm/test/CodeGen/X86/swifterror.ll
The file was modifiedllvm/test/CodeGen/X86/fast-isel-nontemporal.ll
The file was modifiedllvm/test/CodeGen/X86/pr32340.ll
The file was modifiedllvm/test/CodeGen/X86/pr34592.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-m0.ll
The file was modifiedllvm/test/CodeGen/X86/atomic32.ll
The file was modifiedllvm/test/CodeGen/X86/pr30430.ll
The file was modifiedllvm/test/DebugInfo/X86/op_deref.ll
The file was modifiedllvm/test/CodeGen/X86/atomic-unordered.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vsx.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fast-isel-conversion.ll
The file was modifiedllvm/test/CodeGen/PowerPC/popcount.ll
The file was modifiedllvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
The file was modifiedllvm/test/CodeGen/X86/avx512-mask-zext-bugfix.ll
The file was modifiedllvm/test/CodeGen/X86/pr32345.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-vcvt_f.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fast-isel-conversion-fallback.ll
The file was modifiedllvm/test/CodeGen/X86/2009-04-14-IllegalRegs.ll
The file was modifiedllvm/test/CodeGen/X86/atomic64.ll
The file was modifiedllvm/test/CodeGen/X86/pr44749.ll
The file was modifiedllvm/test/CodeGen/Mips/atomic.ll
The file was modifiedllvm/test/CodeGen/X86/avx-load-store.ll
The file was modifiedllvm/test/CodeGen/X86/extend-set-cc-uses-dbg.ll
The file was modifiedllvm/test/CodeGen/X86/pr30813.ll
The file was modifiedllvm/test/CodeGen/X86/crash-O0.ll
The file was modifiedllvm/test/CodeGen/ARM/legalize-bitcast.ll
The file was modifiedllvm/test/CodeGen/X86/pr32284.ll
The file was modifiedllvm/test/CodeGen/X86/mixed-ptr-sizes.ll
The file was modifiedllvm/test/CodeGen/X86/pr32451.ll
The file was modifiedllvm/test/CodeGen/Mips/GlobalISel/llvm-ir/fptosi_and_fptoui.ll
The file was modifiedllvm/test/CodeGen/PowerPC/addegluecrash.ll
The file was modifiedllvm/test/CodeGen/X86/lvi-hardening-loads.ll
The file was modifiedllvm/test/CodeGen/X86/pr39733.ll
The file was modifiedllvm/test/CodeGen/X86/pr47000.ll
Commit 0a2213c6eb24c9deec738e30509815e5bddd860c by pavel
[lldb/cmake] Fix testing support library dependencies

lldbUtilityHelpers does not depend on lldbSymbolHelpers. Remove that
dependency, and add direct lldbSymbolHelpers dependencies where needed.
The file was modifiedlldb/unittests/TestingSupport/CMakeLists.txt
The file was modifiedlldb/unittests/Expression/CMakeLists.txt
The file was modifiedlldb/unittests/SymbolFile/DWARF/CMakeLists.txt
Commit af3789a188116e400dd021bae54d91dc543aca7d by pavel
[lldb] Improve qemu interop for aarch64

qemu calls the "fp" and "lr" registers via their generic names
(x29/x30). This mismatch manifested itself as not being able to unwind
or display values of some local variables.
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
The file was addedlldb/test/API/functionalities/gdb_remote_client/basic_eh_frame-aarch64.yaml
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABIAArch64.h
The file was addedlldb/test/API/functionalities/gdb_remote_client/TestQemuAArch64TargetXml.py