llvm-project/llvm/test/Transforms/PhaseOrdering
Simon Pilgrim 08d153d806 [ValueTracking] computeKnownBits - attempt to use a branch condition feeding a phi to improve known bits range (PR38280)
If computeKnownBits encounters a phi node, and we fail to determine any known bits through direct analysis, see if the incoming value is part of a branch condition feeding the phi.

Handle cases where icmp(IncomingValue PRED Constant) is driving a branch instruction feeding that phi node - at the moment this only handles EQ/ULT/ULE predicate cases as they are the most straightforward to handle and most likely for branch-loop 'max upper bound' cases - we can extend this if/when necessary.

I investigated a more general icmp(LHS PRED RHS) KnownBits system, but the hard limits we put on value tracking depth through phi nodes meant that we were mainly catching constants anyhow.

Fixes the pointless vectorization in PR38280 / Issue #37628 (excessive unrolling still needs handling though)

Differential Revision: https://reviews.llvm.org/D131838
2022-08-16 16:54:44 +01:00
..
AArch64 [PhaseOrdering][AArch64] add test for mul-with-overflow; NFC 2022-08-09 12:38:10 -04:00
ARM [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
SystemZ [PhaseOrdering] add explanatory comment for test; NFC 2022-07-24 17:07:17 -04:00
X86 [ValueTracking] computeKnownBits - attempt to use a branch condition feeding a phi to improve known bits range (PR38280) 2022-08-16 16:54:44 +01:00
2010-03-22-empty-baseclass.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
PR6627.ll
assume-explosion.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
basic.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
bitfield-bittests.ll
cmp-logic.ll [InstCombine] canonicalize 'icmp (trunc X), C' to 'icmp (X & Mask), C' 2022-06-30 15:51:39 -04:00
d83507-knowledge-retention-bug.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
dce-after-argument-promotion.ll [Pipelines] Add a test how DCE works after ArgumentPromotion 2022-06-30 12:56:08 +03:00
deletion-of-loops-that-became-side-effect-free.ll Inliner: don't mark call sites as 'nounwind' if that would be redundant 2022-07-20 14:17:23 +02:00
expect.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
fast-basictest.ll [Reassociate] Enable FP reassociation via 'reassoc' and 'nsz' 2022-07-15 11:44:35 -07:00
fast-reassociate-gvn.ll
gdce.ll
globalaa-retained.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
inlining-alignment-assumptions.ll
instcombine-sroa-inttoptr.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
lifetime-sanitizer.ll
loop-rotation-vs-common-code-hoisting.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
lto-licm.ll
memset-tail.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
min-max-abs-cse.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
minmax.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
openmp-opt-module.ll
partialord-ule.ll
pr32544.ll
pr36760.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
pr39116.ll
pr39282.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
pr40750.ll
pr44461-br-to-switch-rotate.ll
pr45682.ll
pr45687.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
reassociate-after-unroll.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
reassociate-gvn-bdce.ll
reassociate-instcombine.ll
recompute-globalsaa.ll [GlobalOpt] Perform store->dominated load forwarding for stored once globals 2022-06-24 09:09:26 -07:00
rotate.ll
scev-custom-dl.ll
scev.ll
simplifycfg-options.ll
simplifycfg-switch-lowering-vs-correlatedpropagation.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
single-iteration-loop-sroa.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
two-shifts-by-sext.ll
unsigned-multiply-overflow-check.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
vector-select.ll
vector-trunc-inseltpoison.ll
vector-trunc.ll