]> git.ipfire.org Git - thirdparty/gcc.git/commit
Middle-end: Do not model address cost for SELECT_VL style vectorization
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Thu, 14 Dec 2023 13:45:59 +0000 (21:45 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 15 Dec 2023 00:26:45 +0000 (08:26 +0800)
commitc7ef2189855a8cf12427a778cd5a31d42ddf6260
tree6242fc448fcc3a15a09d77424d2871072594743f
parentf998335ac0aa56261789282cba5ae1286ddf3a1f
Middle-end: Do not model address cost for SELECT_VL style vectorization

Follow Richard's suggestions, we should not model address cost in the loop
vectorizer for select_vl or decrement IV since other style vectorization doesn't
do that.

To make cost model comparison apple to apple.
This patch set COST from 2 to 1 which turns out have better codegen
in various codegen for RVV.

Ok for trunk ?

PR target/111153

gcc/ChangeLog:

* tree-vect-loop.cc (vect_estimate_min_profitable_iters):
Remove address cost for select_vl/decrement IV.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/costmodel/riscv/rvv/pr111153.c: Moved to...
* gcc.dg/vect/costmodel/riscv/rvv/pr11153-2.c: ...here.
* gcc.dg/vect/costmodel/riscv/rvv/pr111153-1.c: New test.
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr111153-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr11153-2.c [moved from gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr111153.c with 93% similarity]
gcc/tree-vect-loop.cc