IBM Z: Free bbs in s390_loop_unroll_adjust
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Wed, 3 Nov 2021 08:39:27 +0000 (09:39 +0100)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Wed, 3 Nov 2021 08:39:27 +0000 (09:39 +0100)
gcc/ChangeLog:

* config/s390/s390.c (s390_loop_unroll_adjust): In case of early
exit free bbs.

gcc/config/s390/s390.c

index b2f2f64..510e7f5 100644 (file)
@@ -15400,7 +15400,10 @@ s390_loop_unroll_adjust (unsigned nunroll, struct loop *loop)
                  || (GET_CODE (SET_SRC (set)) == COMPARE
                      && GET_MODE (XEXP (SET_SRC (set), 0)) == BLKmode
                      && GET_MODE (XEXP (SET_SRC (set), 1)) == BLKmode)))
-           return 1;
+           {
+             free (bbs);
+             return 1;
+           }
 
          FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST)
            if (MEM_P (*iter))