1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Analysis
Simon Pilgrim 32c30ddee7 [X86] Implement smarter instruction lowering for FP_TO_UINT from f32/f64 to i32/i64 and vXf32/vXf64 to vXi32 for SSE2 and AVX2 by using the exact semantic of the CVTTPS2SI instruction.
We know that "CVTTPS2SI" returns 0x80000000 for out of range inputs (and for FP_TO_UINT, negative float values are undefined). We can use this to make unsigned conversions from vXf32 to vXi32 more efficient, particularly on targets without blend using the following logic:

small := CVTTPS2SI(x);
fp_to_ui(x) := small | (CVTTPS2SI(x - 2^31) & ARITHMETIC_RIGHT_SHIFT(small, 31))

Even on targets where "PBLENDVPS"/"PBLENDVB" exists, it is often a latency 2, low throughput instruction so this logic is applied there too (in particular for AVX2 also). It furthermore gets rid of one high latency floating point comparison in the previous lowering.

@TomHender checked the correctness of this for all possible floats between -1 and 2^32 (both ends excluded).

Original Patch by @TomHender (Tom Hender)

Differential Revision: https://reviews.llvm.org/D89697
2021-07-14 12:03:49 +01:00
..
AliasSet [noalias.decl] Look through llvm.experimental.noalias.scope.decl 2021-01-19 20:09:42 +01:00
AssumptionCache Revert "[AssumptionCache] Avoid dangling llvm.assume calls in the cache" 2021-02-11 12:17:38 -06:00
BasicAA [BasicAA] Use separate scale variable for GCD. 2021-06-30 20:04:39 +01:00
BlockFrequencyInfo [BPI] Improve static heuristics for "cold" paths. 2020-12-23 22:47:36 +07:00
BranchProbabilityInfo Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
CallGraph Set IgnoreLLVMUsed to false in CallGraph::addToCallGraph() 2021-04-08 11:14:09 -07:00
CFLAliasAnalysis
CostModel [X86] Implement smarter instruction lowering for FP_TO_UINT from f32/f64 to i32/i64 and vXf32/vXf64 to vXi32 for SSE2 and AVX2 by using the exact semantic of the CVTTPS2SI instruction. 2021-07-14 12:03:49 +01:00
DDG Fix print-dot-ddg.ll so it doesn't try to write to the source tree (& uses the test temp paths instead) 2021-01-07 19:57:14 -08:00
Delinearization [SCEV] Support signed predicates in applyLoopGuards. 2021-06-23 10:21:05 +01:00
DemandedBits Add getDemandedBits for uses. 2021-06-02 10:07:40 -04:00
DependenceAnalysis Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
DivergenceAnalysis [NewPM] Introduce (GPU)DivergenceAnalysis in the new pass manager 2021-02-16 10:26:45 +05:30
DominanceFrontier
Dominators [Dominators][NewPM] Pin tests with -analyze to legacy PM 2020-09-15 11:59:00 -07:00
FunctionPropertiesAnalysis
GlobalsModRef [GlobalsAA] Teach to handle addrspacecast. 2020-11-09 00:04:52 -05:00
IRSimilarityIdentifier [IROutliner] Adding instruction strings to IRSimilarityPrinting diagnostics. 2021-02-09 12:11:47 -06:00
IVUsers [SCEV] Strenthen nowrap flags after constant folding for mul exprs 2020-10-25 19:43:58 +01:00
LazyCallGraph [LazyCallGraph] Build SCCs of the reference graph in order 2020-11-02 13:22:42 -08:00
LazyValueAnalysis [JumpThreading] Make -print-lvi-after-jump-threading work with NPM 2020-11-17 23:15:20 -08:00
LegacyDivergenceAnalysis [NewPM] Introduce (GPU)DivergenceAnalysis in the new pass manager 2021-02-16 10:26:45 +05:30
Lint OpaquePtr: Update more tests to use typed sret 2020-11-20 20:08:43 -05:00
LoopAccessAnalysis [SCEV] Retain AddExpr flags when subtracting a foldable constant. 2021-06-22 11:27:51 +01:00
LoopCacheAnalysis/PowerPC
LoopInfo [LoopInfo][NewPM] Fix tests in Analysis/LoopInfo under NPM 2020-09-22 11:31:00 -07:00
LoopNestAnalysis [LoopNest] Consider loop nest with inner loop guard using outer loop 2021-05-07 16:04:18 +00:00
MemoryDependenceAnalysis Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
MemorySSA [NewPM] Rename 'unswitch' to 'simple-loop-unswitch' in PassRegistry 2021-07-09 09:47:33 +02:00
MustExecute Port print-must-be-executed-contexts and print-mustexecute to NPM 2020-11-03 21:06:46 -08: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] Handle zero stride correctly in howManyLessThans 2021-07-13 19:14:01 -07:00
ScopedNoAliasAA [MemCpyOpt] Correctly merge alias scopes during call slot optimization 2020-12-03 09:23:37 -08:00
StackSafetyAnalysis Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
TypeBasedAliasAnalysis Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
ValueTracking Recommit "Generalize getInvertibleOperand recurrence handling slightly" 2021-05-03 16:40:56 -07:00
alias-analysis-uses.ll [NewPM] Pin tests with -debug-pass to legacy PM 2020-09-22 17:54:25 -07:00