1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Analysis/ScalarEvolution
Denis Antrushin 0fed823734 [SCEV] Constant fold MultExpr before applying depth limit.
Summary:
Users of SCEV reasonably assume that multiplication of two constant
SCEVs will in turn be constant.
However, that is not always the case:
First, we can get here with reached depth limit, and will create
MultExpr SCEV `C1 * C2` and cache it.
Then, we can get here with the same operands, but with small depth
level. But this time we will find existing MultExpr SCEV and return
it, instead of expected constant SCEV.

This patch changes getMultExpr to not apply depth limit to all constant
operands expression, allowing them to be folded.

Reviewers: reames, mkazantsev

Subscribers: hiraditya, javed.absar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79893
2020-05-22 18:34:32 +03:00
..
2007-07-15-NegativeStride.ll
2007-08-06-MisinterpretBranch.ll
2007-08-06-Unsigned.ll
2007-09-27-LargeStepping.ll
2007-11-14-SignedAddRec.ll
2007-11-18-OrInstruction.ll
2008-02-11-ReversedCondition.ll
2008-02-12-SMAXTripCount.ll
2008-02-15-UMax.ll
2008-05-25-NegativeStepToZero.ll
2008-06-12-BinomialInt64.ll
2008-07-12-UnneededSelect1.ll
2008-07-12-UnneededSelect2.ll
2008-07-19-InfiniteLoop.ll
2008-07-19-WrappingIV.ll
2008-07-29-SGTTripCount.ll
2008-07-29-SMinExpr.ll
2008-08-04-IVOverflow.ll
2008-08-04-LongAddRec.ll
2008-11-02-QuadraticCrash.ll
2008-11-15-CubicOOM.ll
2008-11-18-LessThanOrEqual.ll
2008-11-18-Stride1.ll
2008-11-18-Stride2.ll
2008-12-08-FiniteSGE.ll
2008-12-11-SMaxOverflow.ll
2008-12-14-StrideAndSigned.ll
2008-12-15-DontUseSDiv.ll
2009-01-02-SignedNegativeStride.ll
2009-04-22-TruncCast.ll
2009-05-09-PointerEdgeCount.ll
2009-07-04-GroupConstantsWidthMismatch.ll
2010-09-03-RequiredTransitive.ll
2011-03-09-ExactNoMaxBECount.ll
2011-04-26-FoldAddRec.ll
2011-10-04-ConstEvolve.ll
2012-03-26-LoadConstant.ll
2012-05-18-LoopPredRecurse.ll
2012-05-29-MulAddRec.ll Require "target datalayout" to be at the beginning of an IR file. 2020-04-20 11:55:49 -07:00
and-xor.ll
avoid-assume-hang.ll
avoid-infinite-recursion-0.ll
avoid-infinite-recursion-1.ll
avoid-smax-0.ll
avoid-smax-1.ll
binomial-explision.ll
cache_loop_exit_limit.ll
constant_condition.ll
depth-limit-overrun.ll [SCEV] Constant fold MultExpr before applying depth limit. 2020-05-22 18:34:32 +03:00
different-loops-recs.ll
div-overflow.ll
do-loop.ll
exact_iter_count.ll
exact-exit-count-more-precise.ll
exhaustive-trip-counts.ll
expander-replace-congruent-ivs.ll
exponential-behavior.ll
ext-antecedent.ll
extract-highbits-sameconstmask.ll
extract-highbits-variablemask.ll
extract-lowbits-sameconstmask.ll
extract-lowbits-variablemask.ll
flags-from-poison-dbg.ll
flags-from-poison.ll [ValueTracking] Let analyses assume a value cannot be partially poison 2020-04-23 08:08:53 +09:00
flattened-0.ll
fold.ll
guards.ll
how-far-to-zero.ll
huge_expression_limit.ll
implied-via-addition.ll
implied-via-division.ll
incorrect-nsw.ll
increasing-or-decreasing-iv.ll
infer-prestart-no-wrap.ll
infer-via-ranges.ll
inner-loop-by-latch-cond-unknown.ll
invalidation.ll
latch-dominating-conditions.ll
limit-depth.ll [SCEV] Constant fold MultExpr before applying depth limit. 2020-05-22 18:34:32 +03:00
load-with-range-metadata.ll
load.ll
lshr-shl-differentconstmask.ll
max-addops-inline.ll
max-addrec-size.ll
max-be-count-not-constant.ll
max-expr-cache.ll
max-mulops-inline.ll
max-trip-count-address-space.ll [SCEV] Simplify umin/max of zext and sext of the same value 2019-10-19 17:23:02 +00:00
max-trip-count.ll [SCEV] Simplify umin/max of zext and sext of the same value 2019-10-19 17:23:02 +00:00
merge-add-rec-many-inputs.ll
min-max-exprs.ll
multiple-max-iterations.ll
no-wrap-add-exprs.ll Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
no-wrap-unknown-becount.ll
non-IV-phi.ll
nowrap-preinc-limits.ll
nsw-offset-assume.ll
nsw-offset.ll
nsw.ll [ValueTracking] Let propagatesPoison support binops/unaryops/cast/etc. 2020-05-13 02:51:42 +09:00
nw-sub-is-not-nw-add.ll
overflow-intrinsics-trip-count.ll
overflow-intrinsics.ll
pointer-sign-bits.ll
pr3909.ll
pr18606-min-zeros.ll
pr18606.ll
pr22179.ll
pr22641.ll
pr22674.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
pr22856.ll
pr24757.ll
pr25369.ll
pr27315.ll
pr34538.ll
pr35890.ll
pr40420.ll
pr44605.ll [SCEV] Use backedge SCEV of PHI only if its input is loop invariant 2020-03-31 18:39:24 +07:00
predicated-trip-count.ll
range_nw_flag.ll [SCEV] accurate range for addrecexpr with nuw flag 2020-01-12 20:22:37 -05:00
range-signedness.ll
returned.ll
scalable-vector.ll [SCEV] Add support for GEPs over scalable vectors. 2020-03-13 16:12:45 -07:00
scev-aa.ll
scev-canonical-mode.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
scev-dispositions.ll
scev-expander-existing-value-offset.ll
scev-expander-incorrect-nowrap.ll
scev-expander-reuse-gep.ll
scev-expander-reuse-unroll.ll
scev-expander-reuse-vect.ll
scev-invalid.ll
scev-prestart-nowrap.ll
sext-inreg.ll
sext-iv-0.ll
sext-iv-1.ll
sext-iv-2.ll
sext-mul.ll [SCEV] Simplify umin/max of zext and sext of the same value 2019-10-19 17:23:02 +00:00
sext-to-zext.ll
sext-zero.ll
shift-op.ll
shl-lshr-differentconstmask.ll
sle.ll
smax-br-phi-idioms.ll
smax.ll
solve-quadratic-i1.ll
solve-quadratic-overflow.ll
solve-quadratic.ll
SolveQuadraticEquation.ll
strip-injective-zext.ll
trip-count2.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count3.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count4.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count5.ll
trip-count6.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count7.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count8.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count9.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count10.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
trip-count11.ll
trip-count12.ll
trip-count13.ll
trip-count14.ll
trip-count15.ll
trip-count-andor.ll [SCEV] Add a mode to skip classification when printing analysis 2019-11-21 10:24:19 -08:00
trip-count-pow2.ll
trip-count-switch.ll
trip-count-unknown-stride.ll
trip-count.ll [Tests] Autogenerate a bunch of SCEV trip count tests for readability. Will likely merge some of these files soon. 2019-11-21 10:46:16 -08:00
tripmultiple_calculation.ll
trunc-simplify.ll
truncate.ll
umin-umax-folds.ll [SCEV] Simplify umin/max of zext and sext of the same value 2019-10-19 17:23:02 +00:00
undefined.ll
unknown_phis.ll
unreachable-code.ll
unsimplified-loop.ll
urem-0.ll
widenable-condition.ll
ZeroStep.ll
zext-divrem.ll
zext-mul.ll
zext-signed-addrec.ll
zext-wrap.ll