1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Analysis
Max Kazantsev fedead4684 Revert "[IndVars] Smart hard uses detection"
This reverts commit 2f425e9c7946b9d74e64ebbfa33c1caa36914402.

It seems that the check that we still should do the transform if we
know the result is constant is missing in this code. So the logic that
has been deleted by this change is still sometimes accidentally useful.
I revert the change to see what can be done about it. The motivating
case is the following:

@Y = global [400 x i16] zeroinitializer, align 1

define i16 @foo() {
entry:
  br label %for.body

for.body:                                         ; preds = %entry, %for.body
  %i = phi i16 [ 0, %entry ], [ %inc, %for.body ]

  %arrayidx = getelementptr inbounds [400 x i16], [400 x i16]* @Y, i16 0, i16 %i
  store i16 0, i16* %arrayidx, align 1
  %inc = add nuw nsw i16 %i, 1
  %cmp = icmp ult i16 %inc, 400
  br i1 %cmp, label %for.body, label %for.end

for.end:                                          ; preds = %for.body
  %inc.lcssa = phi i16 [ %inc, %for.body ]
  ret i16 %inc.lcssa
}

We should be able to figure out that the result is constant, but the patch
breaks it.

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

llvm-svn: 346198
2018-11-06 02:02:05 +00:00
..
AliasSet [Analysis] Make LocationSize pretty-printing more descriptive 2018-10-10 01:35:22 +00:00
AssumptionCache Add files I seem to have dropped in my revert (r290086). 2016-12-19 08:32:13 +00:00
BasicAA [PPC] Remove Darwin support from POWER backend. 2018-08-28 01:18:29 +00:00
BlockFrequencyInfo [BFI] Use rounding while computing profile counts. 2018-08-16 00:26:59 +00:00
BranchProbabilityInfo [BPI] Apply invoke heuristic before loop branch heuristic 2018-06-08 13:03:21 +00:00
CallGraph Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
CFLAliasAnalysis Revert r332657: "[AA] cfl-anders-aa with field sensitivity" 2018-05-17 21:56:39 +00:00
ConstantFolding [ConstantFolding] Constant fold minimum and maximum intrinsics 2018-10-19 18:15:32 +00:00
CostModel [SystemZ::TTI] Improve cost handling of uint/sint to fp conversions. 2018-11-02 17:53:31 +00:00
Delinearization Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
DemandedBits Fix tests after move to utohexstr. 2017-12-28 17:00:37 +00:00
DependenceAnalysis [DA] Delinearise AddRecs if we can prove they don't wrap 2018-06-25 15:13:26 +00:00
DominanceFrontier
Dominators [Dominators] Don't compute DFS InOut numbers eagerly. 2017-06-30 01:28:21 +00:00
GlobalsModRef [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
IVUsers Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
LazyCallGraph
LazyValueAnalysis [JumpThreading] Preservation of DT and LVI across the pass 2018-01-12 21:06:48 +00:00
LegacyDivergenceAnalysis AMDGPU: Fix tests using old number for constant address space 2018-09-10 02:54:25 +00:00
Lint [Lint] Upgrade uses of MemoryIntrinic::getAlignment() to new API. (NFCI) 2018-01-31 16:42:15 +00:00
LoopAccessAnalysis [LV] Teach vectorizer about variant value store into uniform address 2018-10-16 15:46:26 +00:00
LoopInfo
MemoryDependenceAnalysis [MemDep] Fixed handling of invariant.group 2018-05-18 22:40:34 +00:00
MemorySSA llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
MustExecute [MustExecute] Fix algorithmic bug in isGuaranteedToExecute. PR38514 2018-08-17 06:19:17 +00:00
PhiValues Add a PhiValuesAnalysis pass to calculate the underlying values of phis 2018-06-28 14:13:06 +00:00
PostDominators [Dominators] Include infinite loops in PostDominatorTree 2017-08-15 18:14:57 +00:00
ProfileSummary [ProfileSummary] Add options to override hot and cold count thresholds. 2018-11-02 17:39:31 +00:00
RegionInfo [Dominators] Include infinite loops in PostDominatorTree 2017-08-15 18:14:57 +00:00
ScalarEvolution Revert "[IndVars] Smart hard uses detection" 2018-11-06 02:02:05 +00:00
ScopedNoAliasAA
TypeBasedAliasAnalysis [FunctionAttrs] Infer WriteOnly Function Attribute 2018-08-23 15:05:22 +00:00
ValueTracking InstCombine: move hasOneUse check to the top of foldICmpAddConstant 2018-09-10 14:26:44 +00:00
alias-analysis-uses.ll