1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Analysis
Florian Hahn 068181fb4a [SCEV] Support single-cond range check idiom in applyLoopGuards.
This patch extends applyLoopGuards to detect a single-cond range check
idiom that InstCombine generates.

It extends applyLoopGuards to detect conditions of the form
(-C1 + X < C2). InstCombine will create this form when combining two
checks of the form (X u< C2 + C1) and (X >=u C1).

In practice, this enables us to correctly compute a tight trip count
bounds for code as in the function below. InstCombine will fold the
minimum iteration check created by LoopRotate with the user check (< 8).

    void unsigned_check(short *pred, unsigned width) {
        if (width < 8) {
            for (int x = 0; x < width; x++)
                pred[x] = pred[x] * pred[x];
        }
    }

As a consequence, LLVM creates dead vector loops for the code above,
e.g. see https://godbolt.org/z/cb8eTcqET

https://alive2.llvm.org/ce/z/SHHW4d

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D104741
2021-06-25 10:24:40 +01:00
..
AliasSet
AssumptionCache
BasicAA
BlockFrequencyInfo
BranchProbabilityInfo
CallGraph
CFLAliasAnalysis
CostModel [CostModel][AArch64] Improve cost model for vector reduction intrinsics 2021-06-24 12:02:58 +01:00
DDG
Delinearization [SCEV] Support signed predicates in applyLoopGuards. 2021-06-23 10:21:05 +01:00
DemandedBits
DependenceAnalysis
DivergenceAnalysis
DominanceFrontier
Dominators
FunctionPropertiesAnalysis
GlobalsModRef
IRSimilarityIdentifier
IVUsers
LazyCallGraph
LazyValueAnalysis
LegacyDivergenceAnalysis
Lint
LoopAccessAnalysis [SCEV] Retain AddExpr flags when subtracting a foldable constant. 2021-06-22 11:27:51 +01:00
LoopCacheAnalysis/PowerPC
LoopInfo
LoopNestAnalysis
MemoryDependenceAnalysis
MemorySSA
MustExecute
PhiValues
PostDominators
ProfileSummary
RegionInfo
ScalarEvolution [SCEV] Support single-cond range check idiom in applyLoopGuards. 2021-06-25 10:24:40 +01:00
ScopedNoAliasAA
StackSafetyAnalysis
TypeBasedAliasAnalysis
ValueTracking
alias-analysis-uses.ll