This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, SMS 3/3] Skip DEBUG_INSN in loop- dolooââââp.
- From: Revital1 Eres <ERES at il dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rakdver at kam dot mff dot cuni dot cz, Patch Tracking <patches at linaro dot org>, zaks at il dot ibm dot com
- Date: Sun, 8 May 2011 08:02:43 +0300
- Subject: [PATCH, SMS 3/3] Skip DEBUG_INSN in loop- dolooââââp.
Hello,
(sorry for multiple copies of this email)
This small fix was inserted to skip DEBUG_INSNs while
recognizing doloop pattern in loop-doloop.c file. It's a fix
for the already approved do-loop patch (not in mainline yet,
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html) in loop-doloop.c
The patch was tested together with the rest of the patches in this series
and on top of the patch to support do-loop for ARM (not yet in mainline,
but approved http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html).
On ppc64-redhat-linux regtest as well as bootstrap with SMS flags
enabling SMS also on loops with stage count 1. Regtested on SPU.
On arm-linux-gnueabi regtseted on c,c++. Bootstrap c language with SMS
flags enabling SMS also on loops with stage count 1.
OK for mainline?
Thanks,
Revital
Changelog:
* loop-doloop.c (doloop_condition_get): Use prev_nondebug_insn
instead of PREV_INSN.
--- loop-doloop.c 2011-05-07 16:08:27.000000000 +0300
+++ loop-doloop_new.c 2011-05-07 16:07:48.000000000 +0300
@@ -151,7 +151,7 @@ doloop_condition_get (rtx doloop_pat)
inc = XVECEXP (PATTERN (prev_insn), 0, 1);
}
else
- inc = PATTERN (PREV_INSN (doloop_pat));
+ inc = PATTERN (prev_insn);
/* We expect the condition to be of the form (reg != 0) */
cond = XEXP (SET_SRC (cmp), 0);
if (GET_CODE (cond) != NE || XEXP (cond, 1) != const0_rtx)