1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Analysis
Roman Lebedev ecad339479 [SCEV] Recognize @llvm.uadd.sat as %y + umin(%x, (-1 - %y))
----------------------------------------
define i32 @src(i32 %x, i32 %y) {
%0:
  %r = uadd_sat i32 %x, %y
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %t0 = sub nsw nuw i32 4294967295, %y
  %t1 = umin i32 %x, %t0
  %r = add nuw i32 %t1, %y
  ret i32 %r
}
Transformation seems to be correct!

The alternative, naive, lowering could be the following,
although i don't think it's better,
thought it will likely be needed for sadd/ssub/*shl:

----------------------------------------
define i32 @src(i32 %x, i32 %y) {
%0:
  %r = uadd_sat i32 %x, %y
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %t0 = zext i32 %x to i33
  %t1 = zext i32 %y to i33
  %t2 = add nuw i33 %t0, %t1
  %t3 = zext i32 4294967295 to i33
  %t4 = umin i33 %t2, %t3
  %r = trunc i33 %t4 to i32
  ret i32 %r
}
Transformation seems to be correct!
2020-09-21 20:25:54 +03:00
..
AliasSet [NewPM] Port -print-alias-sets to NPM 2020-09-16 18:34:56 -07:00
AssumptionCache
BasicAA [BasicAA] Regenerate test checks 2020-09-19 19:36:10 +02:00
BlockFrequencyInfo
BranchProbabilityInfo Revert "[BPI] Improve static heuristics for integer comparisons" 2020-08-17 20:44:33 +02:00
CallGraph [CallGraph] Ignore callback uses 2020-07-14 13:08:49 -07:00
CFLAliasAnalysis [BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa" 2020-06-26 20:55:44 -07:00
CostModel [CostModel][X86] Add some select shuffle costs tests for D87884 2020-09-21 16:09:05 +01:00
DDG [DDG] Data Dependence Graph - Graph Simplification 2020-02-19 13:41:51 -05:00
Delinearization [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
DemandedBits [DemandedBits][NewPM] Pin some tests to legacy PM 2020-09-15 11:55:58 -07:00
DependenceAnalysis [DependenceAnalysis][NewPM] Fix tests to work under NPM 2020-09-15 11:11:23 -07:00
DivergenceAnalysis Verifier: Disallow byval and similar for AMDGPU calling conventions 2020-07-20 10:58:57 -04:00
DominanceFrontier IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
Dominators [Dominators][NewPM] Pin tests with -analyze to legacy PM 2020-09-15 11:59:00 -07:00
FunctionPropertiesAnalysis Add new function properties to FunctionPropertiesAnalysis 2020-07-23 12:46:47 -07:00
GlobalsModRef [NPM] Translate alias analysis into require<> as well 2020-09-16 08:54:09 -07:00
IVUsers [NPM][IVUsers] Rename ivusers -> iv-users 2020-07-15 09:38:21 -07:00
LazyCallGraph [Tests] Migrate a number of tests to gc-live bundle representation 2020-06-05 16:44:04 -07:00
LazyValueAnalysis [LVI] Don't require DominatorTree in LVI (NFC) 2020-05-19 20:21:46 +02:00
LegacyDivergenceAnalysis Verifier: Disallow byval and similar for AMDGPU calling conventions 2020-07-20 10:58:57 -04:00
Lint [Lint] Add check for intrinsic get.active.lane.mask 2020-09-17 09:22:03 +01:00
LoopAccessAnalysis [LoopAccessAnalysis][NewPM] Fix tests to work under NPM 2020-09-15 11:06:47 -07:00
LoopCacheAnalysis/PowerPC [LoopCacheAnalysis]: Add support for negative stride 2020-02-10 13:22:35 -05:00
LoopInfo [NewPM] Fix 2003-02-19-LoopInfoNestingBug.ll under NPM 2020-09-15 20:21:45 -07:00
LoopNestAnalysis [LoopNest] False negative of arePerfectlyNested with LCSSA loops 2020-08-25 16:20:52 +00:00
MemoryDependenceAnalysis [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
MemorySSA [LSR] Preserve MSSA when using SplitCriticalEdge. 2020-09-21 09:51:26 +01:00
MustExecute Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
PhiValues
PostDominators [PostDominators][NewPM] Fix tests to work under NPM 2020-09-15 11:19:01 -07:00
ProfileSummary
RegionInfo [RegionInfo][NewPM] Fix RegionInfo tests to work under NPM 2020-09-15 11:12:14 -07:00
ScalarEvolution [SCEV] Recognize @llvm.uadd.sat as %y + umin(%x, (-1 - %y)) 2020-09-21 20:25:54 +03:00
ScopedNoAliasAA Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
StackSafetyAnalysis [StackSafety] Ignore allocas with partial lifetime markers 2020-08-27 13:54:41 -07:00
TypeBasedAliasAnalysis Mark masked.{store,scatter,compressstore} intrinsics as write-only 2020-09-09 17:28:21 -05:00
ValueTracking Fix tests after 16f777f4217cfcdcf6ddce8eb1e3525a65563c43 2020-07-14 22:52:26 +02:00
alias-analysis-uses.ll [FunctionAttrs] Rename functionattrs -> function-attrs 2020-07-28 09:09:13 -07:00