llvm-project/llvm/test/Transforms/LoopVectorize/X86
Zi Xuan Wu 9802268ad3 recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize
In loop-vectorize, interleave count and vector factor depend on target register number. Currently, it does not
estimate different register pressure for different register class separately(especially for scalar type,
float type should not be on the same position with int type), so it's not accurate. Specifically,
it causes too many times interleaving/unrolling, result in too many register spills in loop body and hurting performance.

So we need classify the register classes in IR level, and importantly these are abstract register classes,
and are not the target register class of backend provided in td file. It's used to establish the mapping between
the types of IR values and the number of simultaneous live ranges to which we'd like to limit for some set of those types.

For example, POWER target, register num is special when VSX is enabled. When VSX is enabled, the number of int scalar register is 32(GPR),
float is 64(VSR), but for int and float vector register both are 64(VSR). So there should be 2 kinds of register class when vsx is enabled,
and 3 kinds of register class when VSX is NOT enabled.

It runs on POWER target, it makes big(+~30%) performance improvement in one specific bmk(503.bwaves_r) of spec2017 and no other obvious degressions.

Differential revision: https://reviews.llvm.org/D67148

llvm-svn: 374634
2019-10-12 02:53:04 +00:00
..
already-vectorized.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
assume.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
avx1.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
avx512.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
consecutive-ptr-cg-bug.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
consecutive-ptr-uniforms.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
constant-fold.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
constant-vector-operand.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
conversion-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
cost-model-assert.ll [LoopVectorize] add test that asserted after cost model change (PR43582); NFC 2019-10-07 14:48:27 +00:00
cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
float-induction-x86.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fneg-cost.ll [LoopVectorize] Add FNeg instruction support 2019-05-30 18:19:35 +00:00
force-ifcvt.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fp32_to_uint32-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fp64_to_uint32-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fp_to_sint8-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
funclet.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gather-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gather-vs-interleave.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gather_scatter.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gcc-examples.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
illegal-parallel-loop-uniform-write.ll Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS" 2019-07-07 22:12:01 +00:00
imprecise-through-phis.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
int128_no_gather.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
interleaved-accesses-large-gap.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
interleaved-accesses-waw-dependency.ll [LV] Fix test failure in a Release build. 2019-08-02 08:33:41 +00:00
interleaving.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
invariant-load-gather.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
invariant-store-vectorization.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
load-deref-pred.ll Remove a duplicate test 2019-09-12 21:40:15 +00:00
masked_load_store.ll [CostModel][X86] Improve masked load/store AVX1/AVX2 costs 2019-06-02 20:37:02 +00:00
max-mstore.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
metadata-enable.ll Enable LoopVectorization by default. 2019-04-25 04:49:48 +00:00
min-trip-count-switch.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
mul_slm_16bit.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no-vector.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no_fpmath.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no_fpmath_with_hotness.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
nontemporal.ll [LV] Suppress vectorization in some nontemporal cases 2019-06-17 17:20:08 +00:00
optsize.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
outer_loop_test1_no_explicit_vect_width.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
parallel-loops-after-reg2mem.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
parallel-loops.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
powof2div.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr23997.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr34438.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr35432.ll Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS" 2019-07-07 22:12:01 +00:00
pr36524.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr39160.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr42674.ll [X86] Replace -mcpu with -mattr on some tests. 2019-09-06 21:48:44 +00:00
propagate-metadata.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ptr-indvar-crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
rauw-bug.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reduction-crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reduction-fastmath.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reduction-small-size.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
redundant-vf2-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reg-usage-debug.ll recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize 2019-10-12 02:53:04 +00:00
reg-usage.ll recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize 2019-10-12 02:53:04 +00:00
register-assumption.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
scatter_crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
slm-no-vectorize.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
small-size.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
strided_load_cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
struct-store.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
svml-calls-finite.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
svml-calls.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
tail_folding_and_assume_safety.ll [LV] fold-tail predication should be respected even with assume_safety 2019-08-15 07:12:14 +00:00
tail_loop_folding.ll [LV] Fold tail by masking - handle reductions 2019-08-28 09:02:23 +00:00
tripcount.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uint64_to_fp64-cost-model.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uniform-phi.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uniform_load.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uniformshift.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
unroll-pm.ll [PassManagerBuilder] Add option for interleaved loops, for loop vectorize. 2019-04-30 21:29:20 +00:00
unroll-small-loops.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
unroll_selection.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
veclib-calls.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vect.omp.force.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vect.omp.force.small-tc.ll [LV] fold-tail predication should be respected even with assume_safety 2019-08-15 07:12:14 +00:00
vector-scalar-select-cost.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vector_max_bandwidth.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vector_ptr_load_store.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vectorization-remarks-loopid-dbg.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vectorization-remarks-missed.ll [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-19 10:50:47 +00:00
vectorization-remarks-profitable.ll [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-19 10:50:47 +00:00
vectorization-remarks.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
vectorize-only-for-real.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86-interleaved-accesses-masked-group.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86-pr39099.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86-predication.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
x86_fp80-interleaved-access.ll [LV] Deny irregular types in interleavedAccessCanBeWidened 2019-06-17 12:02:24 +00:00
x86_fp80-vector-store.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00