llvm-project/llvm/test/Analysis/CostModel/X86
Andrea Di Biagio b7882b3bd1 [Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
'OK_NonUniformConstValue' to identify operands which are constants but
not constant splats.

The cost model now allows returning 'OK_NonUniformConstValue'
for non splat operands that are instances of ConstantVector or
ConstantDataVector.

With this change, targets are now able to compute different costs
for instructions with non-uniform constant operands.
For example, On X86 the cost of a vector shift may vary depending on whether
the second operand is a uniform or non-uniform constant.

This patch applies the following changes:
 - The cost model computation now takes into account non-uniform constants;
 - The cost of vector shift instructions has been improved in
   X86TargetTransformInfo analysis pass;
 - BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish
   between non-uniform and uniform constant operands.

Added a new test to verify that the output of opt
'-cost-model -analyze' is valid in the following configurations: SSE2,
SSE4.1, AVX, AVX2.

llvm-svn: 201272
2014-02-12 23:43:47 +00:00
..
arith.ll CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles. 2013-04-12 21:15:03 +00:00
cast.ll X86: add costs for 64-bit vector ext/trunc & rebalance 2014-02-06 18:18:36 +00:00
cmp.ll Reverse order of checking SSE level when calculating compare cost, so we check 2012-12-18 22:57:56 +00:00
div.ll X86 cost model: Vectorizing integer division is a bad idea 2013-06-25 19:14:09 +00:00
gep.ll ARM cost model: Address computation in vector mem ops not free 2013-02-08 14:50:48 +00:00
i32.ll We are not ready to estimate the cost of integer expansions based on the number of parts. This test is too noisy. 2012-12-23 09:11:07 +00:00
insert-extract-at-zero.ll Cost Model: Normalize the insert/extract index when splitting types 2012-11-05 21:12:13 +00:00
intrinsic-cost.ll Add the nearbyint -> FNEARBYINT mapping to BasicTargetTransformInfo 2013-07-08 03:24:07 +00:00
lit.local.cfg [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
load_store.ll CostModel: improve the cost model for load/store of non power-of-two types such as <3 x float>, which are popular in graphics. 2013-06-27 17:52:04 +00:00
loop_v2.ll TBAA: remove !tbaa from testing cases if not used. 2013-04-29 22:42:01 +00:00
reduction.ll X86 horizontal vector reduction cost model 2013-09-19 17:48:48 +00:00
sitofp.ll X86 cost model: Model cost for uitofp and sitofp on SSE2 2013-04-08 18:05:48 +00:00
testshiftashr.ll TargetLowering: Fix getTypeConversion handling of extended vector types 2013-04-07 20:22:56 +00:00
testshiftlshr.ll TargetLowering: Fix getTypeConversion handling of extended vector types 2013-04-07 20:22:56 +00:00
testshiftshl.ll TargetLowering: Fix getTypeConversion handling of extended vector types 2013-04-07 20:22:56 +00:00
tiny.ll Cost Model: change the default cost of control flow instructions (br / ret / ...) to zero. 2012-12-05 21:21:26 +00:00
uitofp.ll X86 cost model: Exit before calling getSimpleVT on non-simple VTs 2013-04-17 20:04:53 +00:00
vectorized-loop.ll TBAA: remove !tbaa from testing cases if not used. 2013-04-29 22:42:01 +00:00
vshift-cost.ll [Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called 2014-02-12 23:43:47 +00:00