1. [CVP] Make srem test more robust (NFC) (details)
  2. [InstCombine] Simplify code. NFCI. (details)
  3. [NewPM] Port ConstraintElimination to the new pass manager (details)
  4. [LVI][CVP] Use block value when simplifying icmps (details)
Commit 4f6e11948c37b58e307df5aeeca4c27c546e371e by nikita.ppv
[CVP] Make srem test more robust (NFC)

D69686 will be able to determine that the icmp is always false.
As this is not the purpose of the test, use a different modulus
that doesn't trivialize the condition.
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/srem.ll
Commit 7b782062b4d580e48ab724e278f38cc3da763f02 by benny.kra
[InstCombine] Simplify code. NFCI.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Commit 50bd71e1d727f2fb82bfa306da00e386267572da by i
[NewPM] Port ConstraintElimination to the new pass manager

If -enable-constraint-elimination is specified, add it to the -O2/-O3 pipeline.
(-O1 uses a separate function now.)

Reviewed By: fhahn, aeubanks

Differential Revision:
The file was addedllvm/include/llvm/Transforms/Scalar/ConstraintElimination.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/Scalar/ConstraintElimination.cpp
The file was modifiedllvm/test/Transforms/ConstraintElimination/dom.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
Commit fe79061be2b2915993b5568cddc6b64ea0a525f6 by nikita.ppv
[LVI][CVP] Use block value when simplifying icmps

Add a flag to getPredicateAt() that allows making use of the block
value. This allows us to take into account range information from
the current block, rather than only information that is threaded
over edges, making the icmp simplification in CVP a lot more

I'm not changing getPredicateAt() to use the block value
unconditionally to avoid any impact on the JumpThreading pass,
which is somewhat picky about LVI query order.

Most test changes here are just icmps that now get dropped (while
previously only a result used in a return was replaced). The three
tests in icmp.ll show some representative improvements. Some of
the folds this enables have been covered by IPSCCP in the meantime,
but LVI can reason about some cases which are hard to support in
IPSCCP, such as in test_br_cmp_with_offset.

The compile-time time cost of doing this is fairly minimal, with
a ~0.05% CTMark regression for ReleaseThinLTO:

This is because the block values will typically already be queried
and cached by other CVP optimizations anyway.

Differential Revision:
The file was modifiedllvm/include/llvm/Analysis/LazyValueInfo.h
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/basic.ll
The file was modifiedllvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/range.ll