i386.c (ix86_rtx_costs): Set proper rtx cost for ashl<mode>3_mask...
authorWei Mi <wmi@google.com>
Tue, 2 Apr 2013 16:53:49 +0000 (16:53 +0000)
committerWei Mi <wmi@gcc.gnu.org>
Tue, 2 Apr 2013 16:53:49 +0000 (16:53 +0000)
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

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

index 0e1d5e470b9deecaccb82855dd95295ca0b82089..3ac917a99e3caf2a6ff852a611af362792dc765e 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  Alexander Ivchenko  <alexander.ivchenko@intel.com>
 
        * config.gcc (arm*-*-linux-*): Remove duplicate t-linux-android.
index 8e9d38f8887bbd155f290b2a006a1c1b7251a1d7..71218a0f528a3a9126ed854f00abcaf20b044e1c 100644 (file)
@@ -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;
        }