1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/Analysis
Max Kazantsev ccddc942de [ScalarEvolution] Re-enable Predicate implication from operations
The patch rL298481 was reverted due to crash on clang-with-lto-ubuntu build.
The reason of the crash was type mismatch between either a or b and RHS in the following situation:

  LHS = sext(a +nsw b) > RHS.

This is quite rare, but still possible situation. Normally we need to cast all {a, b, RHS} to their widest type.
But we try to avoid creation of new SCEV that are not constants to avoid initiating recursive analysis that
can take a lot of time and/or cache a bad value for iterations number. To deal with this, in this patch we
reject this case and will not try to analyze it if the type of sum doesn't match with the type of RHS. In this
situation we don't need to create any non-constant SCEVs.

This patch also adds an assertion to the method IsProvedViaContext so that we could fail on it and not
go further into range analysis etc (because in some situations these analyzes succeed even when the passed
arguments have wrong types, what should not normally happen).

The patch also contains a fix for a problem with too narrow scope of the analysis caused by wrong
usage of predicates in recursive invocations.

The regression test on the said failure: test/Analysis/ScalarEvolution/implied-via-addition.ll

Reviewers: reames, apilipenko, anna, sanjoy

Reviewed By: sanjoy

Subscribers: mzolotukhin, mehdi_amini, llvm-commits

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

llvm-svn: 299205
2017-03-31 12:05:30 +00:00
..
AliasSet [AliasSetTracker] Make AST smarter about assume intrinsics that don't actually affect memory. 2016-11-07 14:11:45 +00:00
AssumptionCache Add files I seem to have dropped in my revert (r290086). 2016-12-19 08:32:13 +00:00
BasicAA [BasicAA] Take attributes into account when requesting modref info for a call site 2017-03-01 13:19:51 +00:00
BlockFrequencyInfo
BranchProbabilityInfo
CallGraph
CFLAliasAnalysis [Verifier] Add verification for TBAA metadata 2016-12-11 20:07:15 +00:00
ConstantFolding [ConstantFolding] Fix to prevent constant folding having to repeatedly scan operands. NFCI 2017-03-21 10:17:39 +00:00
CostModel AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
Delinearization [ValueTracking] Make poison propagation more aggressive 2017-02-22 06:52:32 +00:00
DemandedBits
DependenceAnalysis
DivergenceAnalysis AMDGPU: Add all atomicrmw fields to atomic.inc/dec 2017-03-30 22:21:40 +00:00
DominanceFrontier
Dominators
GlobalsModRef Fix regression from my recent GlobalsAA fix. 2016-10-24 21:47:44 +00:00
IVUsers [PM] Teach the LoopPassManager to automatically canonicalize loops by 2017-01-17 19:18:12 +00:00
LazyCallGraph
LazyValueAnalysis [LVI] Add an LVI printer pass to capture test LVI cache after transformations 2017-03-22 19:27:12 +00:00
Lint
LoopAccessAnalysis [LV/LoopAccess] Check statically if an unknown dependence distance can be 2017-02-12 09:32:53 +00:00
LoopInfo
MemoryDependenceAnalysis [PM] The assumption cache is fundamentally designed to be self-updating, 2017-01-15 00:26:18 +00:00
PostDominators Revert "Fix PR 24415 (at least), by making our post-dominator tree behavior sane." 2017-03-02 21:08:37 +00:00
ProfileSummary
RegionInfo Fix minor typo introduce in r297014 2017-03-06 16:03:26 +00:00
ScalarEvolution [ScalarEvolution] Re-enable Predicate implication from operations 2017-03-31 12:05:30 +00:00
ScopedNoAliasAA
TypeBasedAliasAnalysis [TBAAVerifier] Be stricter around verifying scalar nodes 2016-12-29 15:47:05 +00:00
ValueTracking [ValueTracking] use nonnull argument attribute to eliminate null checks 2017-02-12 15:35:34 +00:00
alias-analysis-uses.ll