[llvm] [LV] Pre-committing tests for changing loop interleaving count computation (PR #70272)

Nilanjana Basu via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 19:28:44 PDT 2023


================
@@ -0,0 +1,106 @@
+; RUN: opt < %s -force-vector-width=64 -O3 -S -pass-remarks=loop-vectorize 2>&1 | FileCheck %s
----------------
nilanjana87 wrote:

> Also, what's the motivation for forcing vector-width to 64 here? It is an impossible VF for AArch64. Would it be possible to just let the cost model also pick the VF?

The purpose of the test is to show the impact of interleaving count computation change that will be added in a subsequent patch https://github.com/llvm/llvm-project/pull/70141. The IC is a function of VF & TC (trip count) and to test this change the VF needs to be large enough that the vectorized-interleaved loop runs once or twice. However, the TC threshold to allow interleaving is 128, so I increased the VF to hit this case. 

On trying to work around this by reducing the TC & the TC threshold with `-tiny-trip-count-interleave-threshold` option, the loop is not getting vectorized because of hitting a clause of runtime pointer checks. 

https://github.com/llvm/llvm-project/pull/70272


More information about the llvm-commits mailing list