aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2013-04-02 16:53:49 +0000
committerWei Mi <wmi@gcc.gnu.org>2013-04-02 16:53:49 +0000
commit7a80735b9353db7d9ad46a1880bfcd3e8efbc427 (patch)
tree95f0c1e8de093fe884f8dc8033655b2fbc71c591
parentf423a9e445b6a6c71faf3317278e0455cee0de62 (diff)
downloadgcc-7a80735b9353db7d9ad46a1880bfcd3e8efbc427.zip
gcc-7a80735b9353db7d9ad46a1880bfcd3e8efbc427.tar.gz
gcc-7a80735b9353db7d9ad46a1880bfcd3e8efbc427.tar.bz2
i386.c (ix86_rtx_costs): Set proper rtx cost for ashl<mode>3_mask...
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. From-SVN: r197362
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c7
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;
}