Skip to content

Commit a493434

Browse files
committed
Remove small stride tests.
1 parent b224f56 commit a493434

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

MicroBenchmarks/LoopVectorization/ControlFlowVectorization.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,15 @@ __attribute__((noinline)) static void run_uncond_inc_novec(T *A, unsigned N) {
6767
}
6868

6969
// Define loops with different strides.
70-
// stride=2: 50% active lanes
71-
// stride=4: 25% active lanes
72-
// stride=8: 12.5% active lanes
73-
// stride=16: 6.25% active lanes
74-
// stride=32: 3.125% active lanes
75-
// stride=64: 1.5625% active lanes
76-
// stride=128: 0.78% active lanes
77-
DEF_COND_INC_LOOP(cond_inc_stride_2, 2)
78-
DEF_COND_INC_LOOP(cond_inc_stride_4, 4)
79-
DEF_COND_INC_LOOP(cond_inc_stride_8, 8)
70+
// Stride 16 usually big enough to accross single vector which can test if
71+
// control-flow-vectorization is profitable on these loops.
8072
DEF_COND_INC_LOOP(cond_inc_stride_16, 16)
8173
DEF_COND_INC_LOOP(cond_inc_stride_32, 32)
8274
DEF_COND_INC_LOOP(cond_inc_stride_64, 64)
8375
DEF_COND_INC_LOOP(cond_inc_stride_128, 128)
8476

85-
// Conditional increment by value (sparse condition).
86-
DEF_COND_INC_VALUE_LOOP(cond_inc_by_value, 42)
77+
// Conditional increment by value.
78+
DEF_COND_INC_VALUE_LOOP(cond_inc_by_value, 40)
8779

8880
// Initialize array with random numbers.
8981
template <typename T> static void init_data(T *A) {
@@ -173,9 +165,6 @@ benchmark_cfv_novec(benchmark::State &state, CFVFunc<T> NoVecFn) {
173165
// Add benchmarks for all variants.
174166
#define ADD_CFV_BENCHMARKS(ty) \
175167
BENCHMARK_UNCOND_CASE(ty) \
176-
BENCHMARK_CFV_CASE(cond_inc_stride_2, ty) \
177-
BENCHMARK_CFV_CASE(cond_inc_stride_4, ty) \
178-
BENCHMARK_CFV_CASE(cond_inc_stride_8, ty) \
179168
BENCHMARK_CFV_CASE(cond_inc_stride_16, ty) \
180169
BENCHMARK_CFV_CASE(cond_inc_stride_32, ty) \
181170
BENCHMARK_CFV_CASE(cond_inc_stride_64, ty) \

0 commit comments

Comments
 (0)