aboutsummaryrefslogtreecommitdiff
path: root/gcc/genmatch.c
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/genmatch.c
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/genmatch.c')
0 files changed, 0 insertions, 0 deletions