aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-10-08 12:42:54 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-10-08 10:42:54 +0000
commit08a9e4e734ed74775a014fbe02699c290fbbd5cc (patch)
tree60aecf6c205d507e72f0d6d5459fc593e7d32a5a
parenteb79a6b1cb7b97cda532e2efd5612fa80c3eb005 (diff)
downloadgcc-08a9e4e734ed74775a014fbe02699c290fbbd5cc.zip
gcc-08a9e4e734ed74775a014fbe02699c290fbbd5cc.tar.gz
gcc-08a9e4e734ed74775a014fbe02699c290fbbd5cc.tar.bz2
i386.c (ix86_expand_set_or_movmem): Disable 512bit loops for targets that preffer 128bit.
* i386.c (ix86_expand_set_or_movmem): Disable 512bit loops for targets that preffer 128bit. From-SVN: r253524
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e745313..3890fad 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2017-10-08 Jan Hubicka <hubicka@ucw.cz>
+ * i386.c (ix86_expand_set_or_movmem): Disable 512bit loops for targets
+ that preffer 128bit.
+
+2017-10-08 Jan Hubicka <hubicka@ucw.cz>
+
* i386.c (has_dispatch): Disable for Ryzen.
2017-10-08 Olivier Hainque <hainque@adacore.com>
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8613aa8..1ee8351 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -28947,6 +28947,9 @@ ix86_expand_set_or_movmem (rtx dst, rtx src, rtx count_exp, rtx val_exp,
&& optab_handler (mov_optab, wider_mode) != CODE_FOR_nothing)
move_mode = wider_mode;
+ if (TARGET_AVX128_OPTIMAL && GET_MODE_BITSIZE (move_mode) > 128)
+ move_mode = TImode;
+
/* Find the corresponding vector mode with the same size as MOVE_MODE.
MOVE_MODE is an integer mode at the moment (SI, DI, TI, etc.). */
if (GET_MODE_SIZE (move_mode) > GET_MODE_SIZE (word_mode))