From a6eed94baacb5ff3551adfb42502d1b7fdce652b Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Thu, 13 Dec 2007 09:25:46 +0000 Subject: [PATCH] i386.c (ix86_rtx_costs): Check op0 for ZERO_EXTEND when computing costs for widening multiplication. * config/i386/i386.c (ix86_rtx_costs) [MULT]: Check op0 for ZERO_EXTEND when computing costs for widening multiplication. From-SVN: r130810 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 189371ddb0af..bdcb44bc2b1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-12-13 Torbjorn Granlund + + * config/i386/i386.c (ix86_rtx_costs) [MULT]: Check op0 for + ZERO_EXTEND when computing costs for widening multiplication. + 2007-12-09 John David Anglin PR middle-end/32889 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ddc02b5c673a..e720a58d5883 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -17192,7 +17192,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) nbits = 7; /* Compute costs correctly for widening multiplication. */ - if ((GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op1) == ZERO_EXTEND) + if ((GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op0) == ZERO_EXTEND) && GET_MODE_SIZE (GET_MODE (XEXP (op0, 0))) * 2 == GET_MODE_SIZE (mode)) { -- 2.47.2