aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-07-16 10:45:27 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-07-16 10:53:17 +0200
commit896393791ee34ffc176c87d232dfee735db3aaab (patch)
treea6c3998c77836dc61985937d6f5d06fb120e6feb
parent75c0bf997d2808561451e62aa6b7ae7c8e32b9e9 (diff)
downloadgcc-896393791ee34ffc176c87d232dfee735db3aaab.zip
gcc-896393791ee34ffc176c87d232dfee735db3aaab.tar.gz
gcc-896393791ee34ffc176c87d232dfee735db3aaab.tar.bz2
Fixup unaligned load/store cost for znver5
Currently unaligned YMM and ZMM load and store costs are cheaper than aligned which causes the vectorizer to purposely mis-align accesses by adding an alignment prologue. It looks like the unaligned costs were simply copied from the bogus znver4 costs. The following makes the unaligned costs equal to the aligned costs like in the fixed znver4 version. * config/i386/x86-tune-costs.h (znver5_cost): Update unaligned load and store cost from the aligned costs.
-rw-r--r--gcc/config/i386/x86-tune-costs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/i386/x86-tune-costs.h b/gcc/config/i386/x86-tune-costs.h
index 2ac75c3..769f334 100644
--- a/gcc/config/i386/x86-tune-costs.h
+++ b/gcc/config/i386/x86-tune-costs.h
@@ -2060,8 +2060,8 @@ struct processor_costs znver5_cost = {
in 32bit, 64bit, 128bit, 256bit and 512bit */
{8, 8, 8, 12, 12}, /* cost of storing SSE register
in 32bit, 64bit, 128bit, 256bit and 512bit */
- {6, 6, 6, 6, 6}, /* cost of unaligned loads. */
- {8, 8, 8, 8, 8}, /* cost of unaligned stores. */
+ {6, 6, 10, 10, 12}, /* cost of unaligned loads. */
+ {8, 8, 8, 12, 12}, /* cost of unaligned stores. */
2, 2, 2, /* cost of moving XMM,YMM,ZMM
register. */
6, /* cost of moving SSE register to integer. */