2017-04-11 Uros Bizjak <ubiz...@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.
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))