From 9bb3d6c4ef6c5cbaa7e457b59dbe2ade9055b3fa Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 29 Nov 2018 19:22:30 +0100 Subject: [PATCH] i386.c (inline_memory_move_cost): Check "in" for 2 in MMX_CLASS_P case. * config/i386/i386.c (inline_memory_move_cost): Check "in" for 2 in MMX_CLASS_P case. * config/i386/mmx.md (*mov_internal): Correct TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC alternatives in preferred_for_speed attribute calculation. From-SVN: r266635 --- gcc/ChangeLog | 10 +++++++++- gcc/config/i386/i386.c | 10 ++++------ gcc/config/i386/mmx.md | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc8d2b172e9..8cf443f6b9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-11-29 Uros Bizjak + + * config/i386/i386.c (inline_memory_move_cost): + Check "in" for 2 in MMX_CLASS_P case. + * config/i386/mmx.md (*mov_internal): Correct + TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC + alternatives in preferred_for_speed attribute calculation. + 2018-11-29 Martin Sebor PR c/88172 @@ -20,7 +28,7 @@ inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC. * opts.c (control_options_for_live_patching): New function. (finish_options): Make flag_live_patching incompatible with flag_lto. - Control IPA optimizations based on different levels of + Control IPA optimizations based on different levels of flag_live_patching. 2018-11-29 Giuliano Belinassi diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index cef809f575f..209b74aa4dc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -39480,8 +39480,7 @@ sse_store_index (machine_mode mode) Q_REGS classes. */ static inline int -inline_memory_move_cost (machine_mode mode, enum reg_class regclass, - int in) +inline_memory_move_cost (machine_mode mode, enum reg_class regclass, int in) { int cost; if (FLOAT_CLASS_P (regclass)) @@ -39528,7 +39527,7 @@ inline_memory_move_cost (machine_mode mode, enum reg_class regclass, default: return 100; } - if (in) + if (in == 2) return MAX (ix86_cost->mmx_load [index], ix86_cost->mmx_store [index]); return in ? ix86_cost->mmx_load [index] : ix86_cost->mmx_store [index]; } @@ -39567,7 +39566,7 @@ inline_memory_move_cost (machine_mode mode, enum reg_class regclass, if (mode == TFmode) mode = XFmode; if (in == 2) - cost = MAX (ix86_cost->int_load[2] , ix86_cost->int_store[2]); + cost = MAX (ix86_cost->int_load[2], ix86_cost->int_store[2]); else if (in) cost = ix86_cost->int_load[2]; else @@ -39577,8 +39576,7 @@ inline_memory_move_cost (machine_mode mode, enum reg_class regclass, } static int -ix86_memory_move_cost (machine_mode mode, reg_class_t regclass, - bool in) +ix86_memory_move_cost (machine_mode mode, reg_class_t regclass, bool in) { return inline_memory_move_cost (mode, (enum reg_class) regclass, in ? 1 : 0); } diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index e60b2296ab6..66da7bcd7e5 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -208,9 +208,9 @@ ] (const_string "DI"))) (set (attr "preferred_for_speed") - (cond [(eq_attr "alternative" "10,15") + (cond [(eq_attr "alternative" "9,15") (symbol_ref "TARGET_INTER_UNIT_MOVES_FROM_VEC") - (eq_attr "alternative" "11,16") + (eq_attr "alternative" "10,16") (symbol_ref "TARGET_INTER_UNIT_MOVES_TO_VEC") ] (symbol_ref "true")))]) -- 2.30.2