SuccessChanges

Summary

  1. [ARM] Test for aligned blocks. NFC (details)
  2. [ARM] Align blocks that are not fallthough targets (details)
  3. [SimplifyCFG] markAliveBlocks(): catchswitch: preserve PostDomTree (details)
  4. [InstCombine] Replace one-use select operand based on condition (details)
Commit 2a5b576e3ea41c30537435d989a3dce7a409f8e2 by david.green
[ARM] Test for aligned blocks. NFC
The file was addedllvm/test/CodeGen/Thumb2/aligned-nonfallthrough.ll
Commit 145472421535c71a9ea60af7e5d012ab69dc85ff by david.green
[ARM] Align blocks that are not fallthough targets

If the previous block in a function does not fallthough, adding nop's to
align it will never be executed. This means we can freely (except for
codesize) align more branches. This happens in constantislandspass (as
it cannot happen later) and only happens at aggressive optimization
levels as it does increase codesize.

Differential Revision: https://reviews.llvm.org/D94394
The file was modifiedllvm/test/CodeGen/ARM/ParallelDSP/multi-use-loads.ll
The file was modifiedllvm/test/CodeGen/Thumb2/aligned-nonfallthrough.ll
The file was modifiedllvm/lib/Target/ARM/ARMConstantIslandPass.cpp
Commit 32fc32317a31fc00e7e4086d6c93dd1eab75960c by lebedev.ri
[SimplifyCFG] markAliveBlocks(): catchswitch: preserve PostDomTree

When removing catchpad's from catchswitch, if that removes a successor,
we need to record that in DomTreeUpdater.

This fixes PostDomTree preservation failure in an existing test.
This appears to be the single issue that i see in my current test coverage.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 5238e7b302ffc40707677960da9d64e872745dac by nikita.ppv
[InstCombine] Replace one-use select operand based on condition

InstCombine already performs a fold where X == Y ? f(X) : Z is
transformed to X == Y ? f(Y) : Z if f(Y) simplifies. However,
if f(X) only has one use, then we can always directly replace the
use inside the instruction. To actually be profitable, limit it to
the case where Y is a non-expr constant.

This could be further extended to replace uses further up a one-use
instruction chain, but for now this only looks one level up.

Among other things, this also subsumes D94860.

Differential Revision: https://reviews.llvm.org/D94862
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select-safe-transforms.ll