From 7a80735b9353db7d9ad46a1880bfcd3e8efbc427 Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Tue, 2 Apr 2013 16:53:49 +0000 Subject: 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 7 +++++++ 2 files changed, 13 insertions(+) (limited to 'gcc') 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 + + * 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 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; } -- cgit v1.1