OSDN Git Service

2013-04-02 Wei Mi <wmi@google.com>
authorwmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Apr 2013 16:54:39 +0000 (16:54 +0000)
committerwmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Apr 2013 16:54:39 +0000 (16:54 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@197364 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c

index 25743df..b39a0f4 100644 (file)
@@ -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  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/56768
index 7a441c7..440bd82 100644 (file)
@@ -31622,6 +31622,13 @@ ix86_rtx_costs (rtx x, int code, 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;
        }