From: Wei Mi Date: Tue, 2 Apr 2013 16:53:49 +0000 (+0000) Subject: i386.c (ix86_rtx_costs): Set proper rtx cost for ashl3_mask... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a80735b9353db7d9ad46a1880bfcd3e8efbc427;p=gcc.git i386.c (ix86_rtx_costs): Set proper rtx cost for ashl3_mask... 2013-04-02 Wei Mi * config/i386/i386.c (ix86_rtx_costs): Set proper rtx cost for ashl3_mask, *3_mask and *3_mask in i386.md. From-SVN: r197362 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e1d5e470b9..3ac917a99e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-04-02 Wei Mi + + * config/i386/i386.c (ix86_rtx_costs): Set proper rtx cost for + ashl3_mask, *3_mask and + *3_mask in i386.md. + 2013-04-02 Alexander Ivchenko * config.gcc (arm*-*-linux-*): Remove duplicate t-linux-android. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8e9d38f8887..71218a0f528 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -34174,6 +34174,13 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total, { if (CONST_INT_P (XEXP (x, 1))) *total = cost->shift_const; + else if (GET_CODE (XEXP (x, 1)) == SUBREG + && GET_CODE (XEXP (XEXP (x, 1), 0)) == AND) + { + /* Return the cost after shift-and truncation. */ + *total = cost->shift_var; + return true; + } else *total = cost->shift_var; }