From 756f763b0bae99a148db1b2b9dfb11bc51b384f0 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Mon, 1 Sep 2008 12:28:06 +0000 Subject: [PATCH] arm.c (arm_no_early_mul_dep): Handle multiply-subtract. 2008-09-01 Paul Brook gcc/ * config/arm/arm.c (arm_no_early_mul_dep): Handle multiply-subtract. From-SVN: r139860 --- gcc/ChangeLog | 4 ++++ gcc/config/arm/arm.c | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb9b352f61db..45fea8a0bfb5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-09-01 Paul Brook + + * config/arm/arm.c (arm_no_early_mul_dep): Handle multiply-subtract. + 2008-00-01 Jan Hubicka * config/spu/spu.c (spu_expand_block_move) Update call of MOVE_RATIO. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 6a4b3ef11cde..d22b4fe237bb 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -18235,8 +18235,15 @@ arm_no_early_mul_dep (rtx producer, rtx consumer) op = XVECEXP (op, 0, 0); op = XEXP (op, 1); - return (GET_CODE (op) == PLUS - && !reg_overlap_mentioned_p (value, XEXP (op, 0))); + if (GET_CODE (op) == PLUS || GET_CODE (op) == MINUS) + { + if (GET_CODE (XEXP (op, 0)) == MULT) + return !reg_overlap_mentioned_p (value, XEXP (op, 0)); + else + return !reg_overlap_mentioned_p (value, XEXP (op, 1)); + } + + return 0; } /* We can't rely on the caller doing the proper promotion when