From 147bbdd05159934639f00269720f82be8647bc5d Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 22 Jun 2007 19:51:06 +0200 Subject: [PATCH] re PR target/32413 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:396) PR target/32413 * config/i386/i386.c (ix86_register_move_cost): Rise the cost of moves between MMX/SSE registers to at least 8 units to prevent ICE caused by non-tieable SI/HI/QImodes in SSE registers. From-SVN: r125951 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386.c | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e97babf92f8..349272b8480 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-06-22 Uros Bizjak + + PR target/32413 + * config/i386/i386.c (ix86_register_move_cost): Rise the cost of + moves between MMX/SSE registers to at least 8 units to prevent + ICE caused by non-tieable SI/HI/QImodes in SSE registers. + 2007-06-22 Uros Bizjak * config/i386/i386.c (override_options): Correct x86_sahf diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1483cac582a..5c5cb528858 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -20279,7 +20279,15 @@ ix86_register_move_cost (enum machine_mode mode, enum reg_class class1, /* Moves between SSE/MMX and integer unit are expensive. */ if (MMX_CLASS_P (class1) != MMX_CLASS_P (class2) || SSE_CLASS_P (class1) != SSE_CLASS_P (class2)) - return ix86_cost->mmxsse_to_integer; + + /* ??? By keeping returned value relatively high, we limit the number + of moves between integer and MMX/SSE registers for all targets. + Additionally, high value prevents problem with x86_modes_tieable_p(), + where integer modes in MMX/SSE registers are not tieable + because of missing QImode and HImode moves to, from or between + MMX/SSE registers. */ + return MAX (ix86_cost->mmxsse_to_integer, 8); + if (MAYBE_FLOAT_CLASS_P (class1)) return ix86_cost->fp_move; if (MAYBE_SSE_CLASS_P (class1)) -- 2.30.2