]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/commitdiff
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 25743df9f2bdd99dce4893b5f1d45f490ba74f96..b39a0f4d3e5b606267396cd72d46770098999699 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 7a441c73237445f3c9f83cb5d9d33f3884a95f04..440bd82dd0e00f465f3c48fd7e4e3cbf6afa7e9d 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;
        }