(jump_optimize): When handling dispatch table that always
authorRichard Stallman <rms@gnu.org>
Sat, 26 Sep 1992 19:09:26 +0000 (19:09 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 26 Sep 1992 19:09:26 +0000 (19:09 +0000)
goes to the same place, verify previous insn exists.

From-SVN: r2251

gcc/jump.c

index f32e57ae2428493258936274994853216149bc01..21536b199e361f94c10717c11cfe44c218518664 100644 (file)
@@ -621,6 +621,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                    != XEXP (XVECEXP (pat, diff_vec_p, 0), 0))
                  break;
              if (i == len
+                 && dispatch != 0
                  && GET_CODE (dispatch) == JUMP_INSN
                  && JUMP_LABEL (dispatch) != 0
                  /* Don't mess with a casesi insn.  */