SuccessChanges

Summary

  1. Revert "[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init" (details)
  2. Revert "[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions" (details)
  3. Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG" (details)
  4. AMDGPU/GlobalISel: Select G_FREEZE (details)
  5. [flang] Fix shared library builds for lib/Lower. (details)
  6. [Test] Add test that shows how SimplifyCFG may insert redunant Phi (details)
  7. [Matrix] Also run lowering during -O0. (details)
  8. [SVE][CodeGen] Legalisation of masked loads and stores (details)
  9. [ARM] CSEL generation (details)
  10. Follow up of 2b3c505d0f6e: fixed a typo, and added some more formatting. NFC. (details)
Commit 5831e86190966d58385678eb74b26aefacbfd101 by akuegel
Revert "[NFC] SimplifyCFGOptions: drop multi-parameter ctor, use default member-init"

This reverts commit 90c1b0442a031d6cad686fdc4e5d3db03c3603a6.
This is based on another commit which also needs to be reverted.
The other commit introduced a Dependency Cycle between Transforms/Scalar
and TransformUtils. Scalar already depends (in many ways) on
TransformUtils, so making TransformUtils depend on Scalar should be
avoided.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
The file was modifiedllvm/include/llvm/Transforms/Scalar/SimplifyCFGOptions.h
Commit 1067d3e176ea7b0b1942c163bf8c6c90107768c1 by akuegel
Revert "[NFCI] createCFGSimplificationPass(): migrate to also take SimplifyCFGOptions"

This reverts commit b2018198c32a0535bb1f5bb5b40fbcf50d8d47b7.
This commit introduced a Dependency Cycle between Transforms/Scalar and
Transforms/Utils. Transforms/Scalar already depends on Transforms/Utils,
so if SimplifyCFGOptions.h is moved to Scalar, and Utils/Local.h still
depends on it, we have a cycle.
The file was modifiedllvm/lib/Target/ARM/ARMTargetMachine.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was modifiedllvm/include/llvm/Transforms/Scalar/SimplifyCFG.h
The file was modifiedllvm/include/llvm/Transforms/Scalar.h
The file was removedllvm/include/llvm/Transforms/Scalar/SimplifyCFGOptions.h
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/Local.h
The file was modifiedllvm/lib/Transforms/Scalar/Scalar.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
Commit 90798e09e29012fe316565ea04a1f848c5e40e6e by mkazantsev
Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG"

This reverts commit b893822e32ffe3c1dcf4d5ac0571a282582d72b2.

+ Clang test fixes
+ Insertion point fix for landing pads
The file was modifiedllvm/test/Transforms/CallSiteSplitting/callsite-split.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll
The file was modifiedclang/test/CodeGenObjC/exceptions.m
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
The file was modifiedclang/test/CodeGenOpenCL/convergent.cl
The file was modifiedllvm/test/Transforms/InstCombine/branch.ll
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstCombine/simple_phi_condition.ll
The file was modifiedclang/test/CodeGenObjCXX/exceptions-legacy.mm
The file was modifiedllvm/test/Transforms/InstCombine/phi.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp-constant-phi.ll
Commit 5658002b80c105f715b8deb495b2d4443ddf9914 by petar.avramovic
AMDGPU/GlobalISel: Select G_FREEZE

Select G_FREEZE in the same way that COPY is selected.

Differential Revision: https://reviews.llvm.org/D83031
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-freeze.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-freeze.mir
Commit 1c93671e594d075cb0008dc4f33d863611af9ab9 by david.truby
[flang] Fix shared library builds for lib/Lower.

Summary:
This adds missing definitions for functions in the Lower directory
that were causing failures in shared library builds.
The definitions for these are taken from the fir-dev branch on github.

Reviewers: sscalpone, schweitz, jeanPerier, klausler

Reviewed By: schweitz

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83771
The file was modifiedflang/lib/Lower/CMakeLists.txt
The file was addedflang/lib/Lower/ConvertExpr.cpp
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
Commit 989ee11df6814465714f6292424f9e10668c7755 by mkazantsev
[Test] Add test that shows how SimplifyCFG may insert redunant Phi

It happens when a block cannot be threaded because of a convergent function.
The file was addedllvm/test/Transforms/SimplifyCFG/convergent.ll
Commit cbe0e539e79eaa30d7d0d6f39b9ea4e45f923141 by flo
[Matrix] Also run lowering during -O0.

Currently the backends cannot lower the matrix intrinsics directly and
rely on the lowering to vector instructions happening in the middle-end.
At the moment, this means the backend crashes when matrix types
extension code is compiled with -O0, e.g.
http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O0-g/7902/

This patch enables also runs the lowering with -O0 in the middle-end as
a temporary solution. Long term, a lightweight version of the lowering
should run in the backend, on demand.
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Commit 2762da0a16a763654254e3320a3f46be2bb742b4 by kerry.mclaughlin
[SVE][CodeGen] Legalisation of masked loads and stores

Summary:
This patch modifies IncrementMemoryAddress to use a vscale
when calculating the new address if the data type is scalable.

Also adds tablegen patterns which match an extract_subvector
of a legal predicate type with zip1/zip2 instructions

Reviewers: sdesmalen, efriedma, david-arm

Reviewed By: efriedma, david-arm

Subscribers: tschuett, hiraditya, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83137
The file was modifiedllvm/test/CodeGen/AArch64/sve-split-load.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/sve-split-store.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit 146d35b6eeb5b360217d2f14a18c87b1a0aca77e by david.green
[ARM] CSEL generation

This adds a peephole optimisation to turn a t2MOVccr that could not be
folded into any other instruction into a CSEL on 8.1-m. The t2MOVccr
would usually be expanded into a conditional mov, that becomes an IT;
MOV pair. We can instead generate a CSEL instruction, which can
potentially be smaller and allows better register allocation freedom,
which can help reduce codesize. Performance is more variable and may
depend on the micrarchitecture details, but initial results look good.
If we need to control this per-cpu, we can add a subtarget feature as we
need it.

Original patch by David Penry.

Differential Revision: https://reviews.llvm.org/D83566
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/test/CodeGen/Thumb2/mve-abs.ll
The file was modifiedllvm/lib/Target/ARM/Thumb2InstrInfo.h
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmaxv.ll
The file was modifiedllvm/test/CodeGen/Thumb2/float-ops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/csel.ll
The file was modifiedllvm/lib/Target/ARM/Thumb2InstrInfo.cpp
Commit 15d058f16ec3a103587d589a8ccbbb7375feae7a by sjoerd.meijer
Follow up of 2b3c505d0f6e: fixed a typo, and added some more formatting. NFC.
The file was modifiedllvm/docs/LangRef.rst