diff mbox series

[i386] : Correctly compute number of GPR moves in memory move cost function

Message ID CAFULd4YdXMVc-=Pe7+LL5OJu6GqZRktyi_GNX_j7zV5KFX32aw@mail.gmail.com
State New
Headers show
Series [i386] : Correctly compute number of GPR moves in memory move cost function | expand

Commit Message

Uros Bizjak Dec. 2, 2018, 10:24 p.m. UTC
TFmode is moved differently than XFmode from a while ago.

2018-12-02  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.c (inline_memory_move_cost): Correctly
    compute number of TFmode GPR moves.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.
diff mbox series

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 266635)
+++ config/i386/i386.c	(working copy)
@@ -39562,9 +39562,6 @@  inline_memory_move_cost (machine_mode mode, enum r
 	  return MAX (ix86_cost->int_load[1], ix86_cost->int_store[1]);
 	return in ? ix86_cost->int_load[1] : ix86_cost->int_store[1];
       default:
-	/* Compute number of 32bit moves needed.  TFmode is moved as XFmode.  */
-	if (mode == TFmode)
-	  mode = XFmode;
 	if (in == 2)
 	  cost = MAX (ix86_cost->int_load[2], ix86_cost->int_store[2]);
 	else if (in)
@@ -39571,6 +39568,7 @@  inline_memory_move_cost (machine_mode mode, enum r
 	  cost = ix86_cost->int_load[2];
 	else
 	  cost = ix86_cost->int_store[2];
+	/* Multiply with the number of GPR moves needed.  */
 	return cost * CEIL ((int) GET_MODE_SIZE (mode), UNITS_PER_WORD);
     }
 }