diff options
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/i386/i386.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e1d5e4..3ac917a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-04-02 Wei Mi <wmi@google.com> + + * config/i386/i386.c (ix86_rtx_costs): Set proper rtx cost for + ashl<mode>3_mask, *<shift_insn><mode>3_mask and + *<rotate_insn><mode>3_mask in i386.md. + 2013-04-02 Alexander Ivchenko <alexander.ivchenko@intel.com> * config.gcc (arm*-*-linux-*): Remove duplicate t-linux-android. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8e9d38f..71218a0 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; } |
