aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-02-16 08:59:03 +0100
committerJakub Jelinek <jakub@redhat.com>2021-02-16 08:59:03 +0100
commit1531f39268c8973cf9478585fba5c5bbdb6e9c4c (patch)
tree5a9e9e29cdc883a2258dc42cf008893d6f1fa634 /gcc/tree-vect-stmts.c
parent0b5c58c2dc3734005d4d5e4be4e6920f2dada64f (diff)
downloadgcc-1531f39268c8973cf9478585fba5c5bbdb6e9c4c.zip
gcc-1531f39268c8973cf9478585fba5c5bbdb6e9c4c.tar.gz
gcc-1531f39268c8973cf9478585fba5c5bbdb6e9c4c.tar.bz2
openmp: Fix up vectorization simd call badness computation [PR99100]
As mentioned in the PR, ix86_simd_clone_usable didn't make it more desirable to use 'e' mangled AVX512F entrypoints over 'd' mangled ones (AVX2) with the same simdlen. This patch fixes that. I have tweaked the generic code too to make more room for these target specific badness factors. 2021-02-16 Jakub Jelinek <jakub@redhat.com> PR target/99100 * tree-vect-stmts.c (vectorizable_simd_clone_call): For num_calls != 1 multiply by 4096 and for inbranch by 8192. * config/i386/i386.c (ix86_simd_clone_usable): For TARGET_AVX512F, return 3, 2 or 1 for mangle letters 'b', 'c' or 'd'. * gcc.target/i386/pr99100.c: New test.
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 083f38b..85d3161 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -3914,9 +3914,9 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,
|| n->simdclone->nargs != nargs)
continue;
if (num_calls != 1)
- this_badness += exact_log2 (num_calls) * 1024;
+ this_badness += exact_log2 (num_calls) * 4096;
if (n->simdclone->inbranch)
- this_badness += 2048;
+ this_badness += 8192;
int target_badness = targetm.simd_clone.usable (n);
if (target_badness < 0)
continue;