diff mbox

[i386] : Improve STV convert gain function when shifts are involved

Message ID CAFULd4ZW9FAowzsz1uAn-GcC00NyUoyy5UGT-7kaSLMMAzGDLA@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak April 11, 2017, 8:38 p.m. UTC
2017-04-11  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
    Use shift_const cost parameter when calculating gain of STV shifts.

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

Committed to mainline SVN.

Uros.
diff mbox

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 246843)
+++ config/i386/i386.c	(working copy)
@@ -3407,7 +3407,7 @@  dimode_scalar_chain::compute_convert_gain ()
       else if (GET_CODE (src) == ASHIFT
 	       || GET_CODE (src) == LSHIFTRT)
 	{
-	  gain += ix86_cost->add;
+	  gain += ix86_cost->shift_const;
     	  if (CONST_INT_P (XEXP (src, 0)))
 	    gain -= vector_const_cost (XEXP (src, 0));
 	  if (CONST_INT_P (XEXP (src, 1))