aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2020-07-31 07:49:39 -0500
committerKewen Lin <linkw@linux.ibm.com>2020-07-31 08:16:42 -0500
commitc89366b12ff4f36253bae125b794cbe687f7e40b (patch)
tree82ed9ae4b4046b9d619dcd0b006d13b78bace89a /gcc/testsuite
parent89db36b05ea7df12926d198ec4b1be69af1b6555 (diff)
downloadgcc-c89366b12ff4f36253bae125b794cbe687f7e40b.zip
gcc-c89366b12ff4f36253bae125b794cbe687f7e40b.tar.gz
gcc-c89366b12ff4f36253bae125b794cbe687f7e40b.tar.bz2
vect: Don't consider branch costs if no peeled iterations
Currently vectorizer cost modeling counts branch taken costs for prologue and epilogue if the number of iterations is unknown. But it isn't sensible if there are no peeled iterations. This patch is to guard them under peel_iters_prologue > 0 or peel_iters_epilogue > 0. Bootstrapped/regtested on powerpc64le-linux-gnu and aarch64-linux-gnu. gcc/ChangeLog: * tree-vect-loop.c (vect_get_known_peeling_cost): Don't consider branch taken costs for prologue and epilogue if they don't exist. (vect_estimate_min_profitable_iters): Likewise. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/cost_model_2.c: Adjust due to cost model change.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/cost_model_2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cost_model_2.c b/gcc/testsuite/gcc.target/aarch64/sve/cost_model_2.c
index d9d7078..a7d7483 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/cost_model_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/cost_model_2.c
@@ -9,4 +9,4 @@ vset (int *restrict dst, int *restrict src, int count)
*dst++ = 1;
}
-/* { dg-final { scan-assembler-times {\tst1w\tz} 1 } } */
+/* { dg-final { scan-assembler-times {\tstr\tq} 1 } } */