]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/11841 (The code compiled with -funroll-loops crashes)
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 17 May 2004 21:05:51 +0000 (21:05 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 17 May 2004 21:05:51 +0000 (21:05 +0000)
PR optimization/11841
* loop.h (REGNO_LAST_NOTE_LUID): New macro.
* unroll.c (unroll_loop): Take into account notes when deciding
whether a pseudo is local to the loop.

From-SVN: r81950

gcc/ChangeLog
gcc/loop.h
gcc/testsuite/ChangeLog
gcc/unroll.c

index 3f9c4ad91059b58cfa7825e77d42a7e10a78aab6..3e793dacb78c5201fedc4e871ff8fb5cfacc2eb0 100644 (file)
@@ -1,3 +1,10 @@
+2004-04-17  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR optimization/11841
+       * loop.h (REGNO_LAST_NOTE_LUID): New macro.
+       * unroll.c (unroll_loop): Take into account notes when deciding
+       whether a pseudo is local to the loop.
+
 2004-05-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        Backport from mainline
index 1dffdddec2e0ad42802664877251986d4b4df39b..20d6e826be6b0aa38fd15bd53bdf951383daa4d5 100644 (file)
@@ -51,6 +51,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #define REGNO_FIRST_LUID(REGNO) uid_luid[REGNO_FIRST_UID (REGNO)]
 #define REGNO_LAST_LUID(REGNO) uid_luid[REGNO_LAST_UID (REGNO)]
+#define REGNO_LAST_NOTE_LUID(REGNO) uid_luid[REGNO_LAST_NOTE_UID (REGNO)]
 
 
 /* A "basic induction variable" or biv is a pseudo reg that is set
index a3812b3314d51d24bfe97c7a076679117aa5c0c3..bfaeb943a5f3edd50d57f9935abe9c4140cc3dc5 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * gcc.dg/loop-4.c: New test.
+
 2004-04-29  Matthias Klose  <doko@debian.org>
 
        Backport:
index 4c6f74ea1c7ac191840b0d1aff7d6e220b44f447..a8142080918040ed88e9cc2ecdaec1855e83d32e 100644 (file)
@@ -794,8 +794,8 @@ unroll_loop (loop, insn_count, strength_reduce_p)
       for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
        if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
            && REGNO_FIRST_LUID (r) >= copy_start_luid
-           && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
-           && REGNO_LAST_LUID (r) <= copy_end_luid)
+           && REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) < max_uid_for_loop
+           && REGNO_LAST_NOTE_LUID (r) <= copy_end_luid)
          {
            /* However, we must also check for loop-carried dependencies.
               If the value the pseudo has at the end of iteration X is