This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ARM mls scheduling fix.
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 1 Sep 2008 13:27:07 +0100
- Subject: ARM mls scheduling fix.
The patch below makes arm_no_early_mul_dep handle multiply-subtract
instructions as well as multiply-add.
Tested on arm-none-eabi
Applied to fsf head.
Paul
2008-08-28 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_no_early_mul_dep): Handle multiply-subtract.
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c (revision 139856)
+++ gcc/config/arm/arm.c (working copy)
@@ -18235,8 +18235,15 @@ arm_no_early_mul_dep (rtx producer, rtx
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