1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/Analysis/ScalarEvolution
Roman Tereshin 9cbf4aa413 [SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw><nsw> transform
if the top level addition in (D + (C-D + x + ...)) could be proven to
not wrap, where the choice of D also maximizes the number of trailing
zeroes of (C-D + x + ...), ensuring homogeneous behaviour of the
transformation and better canonicalization of such expressions.

This enables better canonicalization of expressions like

  1 + zext(5 + 20 * %x + 24 * %y)  and
      zext(6 + 20 * %x + 24 * %y)

which get both transformed to

  2 + zext(4 + 20 * %x + 24 * %y)

This pattern is common in address arithmetics and the transformation
makes it easier for passes like LoadStoreVectorizer to prove that 2 or
more memory accesses are consecutive and optimize (vectorize) them.

Reviewed By: mzolotukhin

Differential Revision: https://reviews.llvm.org/D48853

llvm-svn: 337859
2018-07-24 21:48:56 +00: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 [SimplifyIndVars] Ignore dead users 2018-06-13 02:25:32 +00:00
and-xor.ll [SCEV] Simplify zext/trunc idiom that appears when handling bitmasks. 2018-06-14 17:13:48 +00:00
avoid-assume-hang.ll
avoid-infinite-recursion-0.ll
avoid-infinite-recursion-1.ll
avoid-smax-0.ll
avoid-smax-1.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
cache_loop_exit_limit.ll
constant_condition.ll
different-loops-recs.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
div-overflow.ll
do-loop.ll
exact_iter_count.ll Re-enable "[SCEV] Make computeExitLimit more simple and more powerful" 2018-05-03 02:37:55 +00:00
exhaustive-trip-counts.ll
expander-replace-congruent-ivs.ll
exponential-behavior.ll
ext-antecedent.ll
extract-highbits-sameconstmask.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
extract-highbits-variablemask.ll [NFC][SCEV] Add tests related to bit masking (PR37793) 2018-06-20 07:54:11 +00:00
extract-lowbits-sameconstmask.ll [NFC][SCEV] Add tests related to bit masking (PR37793) 2018-06-20 07:54:11 +00:00
extract-lowbits-variablemask.ll [NFC][SCEV] Add tests related to bit masking (PR37793) 2018-06-20 07:54:11 +00:00
flags-from-poison-dbg.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
flags-from-poison.ll
flattened-0.ll
fold.ll Fix incorrect CHECK-LABEL 2018-06-11 19:56:12 +00:00
guards.ll [SimplifyIndVars] Ignore dead users 2018-06-13 02:25:32 +00:00
how-far-to-zero.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 [SCEV] Re-land: Fix isKnownPredicate 2018-03-19 06:35:30 +00:00
invalidation.ll
latch-dominating-conditions.ll
limit-depth.ll
load-with-range-metadata.ll
load.ll
lshr-shl-differentconstmask.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
max-addops-inline.ll
max-addrec-size.ll
max-be-count-not-constant.ll [SCEV] Fix an assertion failure in the max backedge taken count 2017-10-25 21:41:00 +00:00
max-mulops-inline.ll
max-trip-count-address-space.ll [SCEV] Simplify trunc-of-add/mul to add/mul-of-trunc under more circumstances. 2018-06-14 17:13:35 +00:00
max-trip-count.ll [SCEV] Make exact taken count calculation more optimistic 2018-03-27 07:30:38 +00:00
merge-add-rec-many-inputs.ll Fix overconfident assert in ScalarEvolution::isImpliedViaMerge 2018-06-29 11:46:30 +00:00
min-max-exprs.ll
no-wrap-add-exprs.ll [SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw><nsw> transform 2018-07-24 21:48:56 +00:00
no-wrap-unknown-becount.ll
non-IV-phi.ll
nowrap-preinc-limits.ll
nsw-offset-assume.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
nsw-offset.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
nsw.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
nw-sub-is-not-nw-add.ll
overflow-intrinsics.ll
pointer-sign-bits.ll
pr3909.ll
pr18606-min-zeros.ll
pr18606.ll
pr22179.ll
pr22641.ll
pr22674.ll
pr22856.ll
pr24757.ll
pr25369.ll
pr27315.ll
pr28705.ll
pr34538.ll [SCEV] Handling for ICmp occuring in the evolution chain. 2017-11-13 16:43:24 +00:00
pr35890.ll [SCEV] Make getPostIncExpr guaranteed to return AddRec 2018-02-12 05:09:38 +00:00
predicated-trip-count.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
range-signedness.ll
returned.ll
scev-aa.ll
scev-canonical-mode.ll
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 [SCEV] Simplify trunc-of-add/mul to add/mul-of-trunc under more circumstances. 2018-06-14 17:13:35 +00:00
sext-iv-0.ll
sext-iv-1.ll
sext-iv-2.ll
sext-mul.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
sext-to-zext.ll
sext-zero.ll Revert "[SCEV] Add nuw/nsw to mul ops in StrengthenNoWrapFlags" 2018-06-19 04:09:44 +00:00
shift-op.ll [SCEV] Fix predicate usage in computeExitLimitFromICmp 2017-12-08 12:19:45 +00:00
shl-lshr-differentconstmask.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
sle.ll
smax-br-phi-idioms.ll
smax.ll
SolveQuadraticEquation.ll
strip-injective-zext.ll [SCEV] Simplify trunc-of-add/mul to add/mul-of-trunc under more circumstances. 2018-06-14 17:13:35 +00:00
trip-count2.ll
trip-count3.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
trip-count4.ll
trip-count5.ll
trip-count6.ll
trip-count7.ll
trip-count8.ll
trip-count9.ll
trip-count10.ll
trip-count11.ll
trip-count12.ll
trip-count13.ll
trip-count14.ll [SCEV] Make exact taken count calculation more optimistic 2018-03-27 07:30:38 +00:00
trip-count-pow2.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
trip-count-switch.ll
trip-count-unknown-stride.ll
trip-count.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
tripmultiple_calculation.ll
trunc-simplify.ll [SCEV] Simplify trunc-of-add/mul to add/mul-of-trunc under more circumstances. 2018-06-14 17:13:35 +00:00
truncate.ll [SCEV] Fix buggy behavior in getAddExpr with truncs 2018-07-19 01:46:21 +00:00
undefined.ll
unknown_phis.ll [SCEV] Smart range calculation for SCEVUnknown Phis 2018-03-01 06:56:48 +00:00
unreachable-code.ll
unsimplified-loop.ll
urem-0.ll
ZeroStep.ll
zext-divrem.ll [SCEV] Re-apply r335197 (with Polly fixes). 2018-06-21 21:29:54 +00:00
zext-mul.ll Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
zext-signed-addrec.ll
zext-wrap.ll