diff mbox

[SMS,3/3] Skip DEBUG_INSN in loop-doloop.c

Message ID BANLkTinBqj+LqGfEzUuH-5LZfNXs=1L=LA@mail.gmail.com
State New
Headers show

Commit Message

Revital Eres May 8, 2011, 4:37 a.m. UTC
Hello,

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.

Comments

Zdenek Dvorak May 8, 2011, 5:52 a.m. UTC | #1
Hi,

> 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?

OK,

Zdenek
diff mbox

Patch

--- 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)