From b0896c3319f63b9000b3c0dfae800f18104414bd Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Tue, 2 Apr 2013 16:54:39 +0000 Subject: [PATCH] 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: r197364 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25743df9f2bd..b39a0f4d3e5b 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 Richard Biener PR middle-end/56768 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7a441c732374..440bd82dd0e0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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; } -- 2.47.2