SuccessChanges

Summary

  1. [LV] Add some const to RecurrenceDescriptor. NFC (details)
  2. [Hexagon] Fix perfect shuffle generation for single vectors (details)
  3. [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations (details)
  4. [CVP] Regenerate test checks (NFC) (details)
  5. [SLP] make commutative check apply only to binops; NFC (details)
  6. [x86] add tests for multi-use fast sqrt/recip; NFC (details)
  7. [AArch64] add tests for multi-use fast sqrt/recip; NFC (details)
  8. [DAGCombiner] skip reciprocal divisor optimization for x/sqrt(x) (details)
  9. [FastISel] update to use intrinsic's isCommutative(); NFC (details)
  10. [libcxx/variant] Implement workaround for GCC bug. (details)
  11. [LV] Update CFG before adding runtime checks. (details)
  12. Fix gcc warning by explicitly initializing the base class copy ctor (NFC) (details)
Commit 543c5425f1d3ee1be04accd7e658decb0ba27eeb by david.green
[LV] Add some const to RecurrenceDescriptor. NFC
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 69fac677bc20ab2b3d8538f76aba81bf9630d6c4 by kparzysz
[Hexagon] Fix perfect shuffle generation for single vectors

Perfect shuffle instruction (vdealvdd/vshuffvdd) work on vector
pairs. When given a single input vector, half of it first needs
to be transposed into the other vector before the generated
shuffles can take effect. Also the first transpose needs to be
undone at the end (this last step was missing).
The file was addedllvm/test/CodeGen/Hexagon/autohvx/isel-shuff-single.ll
The file was modifiedllvm/test/CodeGen/Hexagon/isel-hvx-pred-bitcast-order.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
Commit 11cf6346fd49a54cf1f0a8fbf5dee0dab0f4f217 by atrosinenko
[NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D86400
The file was modifiedcompiler-rt/lib/builtins/divsi3.c
The file was modifiedcompiler-rt/lib/builtins/int_div_impl.inc
The file was modifiedcompiler-rt/lib/builtins/modti3.c
The file was modifiedcompiler-rt/lib/builtins/divti3.c
The file was modifiedcompiler-rt/lib/builtins/divdi3.c
The file was modifiedcompiler-rt/lib/builtins/moddi3.c
Commit cb392c870d12eb520f84c8b7eb4f57e37483baed by nikita.ppv
[CVP] Regenerate test checks (NFC)
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/basic.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/range.ll
Commit af4581e8ab1648ff4df0b7fe3769160e6b9f2617 by spatel
[SLP] make commutative check apply only to binops; NFC

As discussed in D86798, it's not clear if the caller code
works with a more liberal definition of "commutative" that
includes intrinsics like min/max. This makes the binop
restriction (current functionality is unchanged) explicit
until the code is audited/tested.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit ed5fe00e72b0c6dbb71c692cc6a932308b86179d by spatel
[x86] add tests for multi-use fast sqrt/recip; NFC
The file was modifiedllvm/test/CodeGen/X86/sqrt-fastmath.ll
Commit 7692cb1a6fd1b3978855f637d4f09da035085c90 by spatel
[AArch64] add tests for multi-use fast sqrt/recip; NFC
The file was modifiedllvm/test/CodeGen/AArch64/sqrt-fastmath.ll
Commit 716e35a0cf53e85a5fddc7ff86b79a751b1b2040 by spatel
[DAGCombiner] skip reciprocal divisor optimization for x/sqrt(x)

In general, we probably want to try the multi-use reciprocal
transform before sqrt transforms, but x/sqrt(x) is a special-case
because that will always reduce to plain sqrt(x) or an estimate.

The AArch64 tests show that the transform is limited by TLI
hook to patterns where there are 3 or more uses of the divisor.
So this change can result in an extra division compared to
what we had, but that's the intended behvior based on the
current setting of that hook.
The file was modifiedllvm/test/CodeGen/AArch64/sqrt-fastmath.ll
The file was modifiedllvm/test/CodeGen/X86/sqrt-fastmath.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 2d3e12818e6e2466052db41833d1d564628ecfc9 by spatel
[FastISel] update to use intrinsic's isCommutative(); NFC

This requires adding a missing 'const' to the definition because
the callers are using const args, but there should be no change
in behavior.

The intrinsic method was added with D86798 / rG096527214033
The file was modifiedllvm/lib/Target/AArch64/AArch64FastISel.cpp
The file was modifiedllvm/lib/Target/X86/X86FastISel.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicInst.h
The file was modifiedllvm/include/llvm/CodeGen/FastISel.h
Commit 7d15ece79c16dc3237fc514ff56a69e3d58fbd39 by Louis Dionne
[libcxx/variant] Implement workaround for GCC bug.

A parameter pack is deemed to be uncaptured, which is bogus... but it seems to
be because it's within an expression that involves `decltype` of an uncaptured
pack or something: https://godbolt.org/z/b8z3sh

Drive-by fix for uglified name.

Differential Revision: https://reviews.llvm.org/D86827
The file was modifiedlibcxx/include/variant
Commit eb35ebb3a2c6db62ec54efdaff23e4f31d118c85 by flo
[LV] Update CFG before adding runtime checks.

addRuntimeChecks uses SCEVExpander, which relies on the DT/LoopInfo to
be up-to-date. Changing the CFG afterwards may invalidate some inserted
instructions, especially LCSSA phis.

Reorder the code to first update the CFG and then create the runtime
checks. This should not have any impact on the generated code, as we
adjust the CFG and generate runtime checks together.

Fixes PR47343.
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was addedllvm/test/Transforms/LoopVectorize/pr47343-expander-lcssa-after-cfg-update.ll
Commit 719548d63d9f906b3b0e0e7d7681a9bfa1d3d8cf by joker.eph
Fix gcc warning by explicitly initializing the base class copy ctor (NFC)

Full diagnostic was:

warning: base class ‘class mlir::OptReductionBase<mlir::OptReductionPass>’ should be explicitly initialized in the copy constructor [-Wextra]
The file was modifiedmlir/tools/mlir-reduce/OptReductionPass.cpp