Commit 9bb3d6c4 by Uros Bizjak

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<mode>_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
parent 550dfbdc
2018-11-29 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (inline_memory_move_cost):
Check "in" for 2 in MMX_CLASS_P case.
* config/i386/mmx.md (*mov<mode>_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 <msebor@redhat.com>
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 <giuliano.belinassi@usp.br>
......@@ -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);
}
......@@ -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")))])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment