(jump_optimize): Don't optimize jumps to store-flag insns
authorRichard Stallman <rms@gnu.org>
Wed, 14 Oct 1992 04:21:51 +0000 (04:21 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 14 Oct 1992 04:21:51 +0000 (04:21 +0000)
when BLKmode values are being compared.

From-SVN: r2450

gcc/jump.c

index 8ed0c9897256fdacfea78aeba58fdd103f620e14..3d66fcf99b49681e29cdf3cdd1015b53b1219d8d 100644 (file)
@@ -1019,6 +1019,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                      && simplejump_p (temp4)
                      && JUMP_LABEL (temp4) == JUMP_LABEL (insn)))
              && (temp4 = get_condition (insn, &temp5)) != 0
+             /* We must be comparing objects whose modes imply the size.
+                We could handle BLKmode if (1) emit_store_flag could
+                and (2) we could find the size reliably.  */
+             && GET_MODE (XEXP (temp4, 0)) != BLKmode
 
              /* If B is zero, OK; if A is zero, can only do (1) if we
                 can reverse the condition.  See if (3) applies possibly
@@ -1200,6 +1204,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                      && simplejump_p (temp3)
                      && JUMP_LABEL (temp3) == JUMP_LABEL (insn)))
              && (temp3 = get_condition (insn, &temp4)) != 0
+             /* We must be comparing objects whose modes imply the size.
+                We could handle BLKmode if (1) emit_store_flag could
+                and (2) we could find the size reliably.  */
+             && GET_MODE (XEXP (temp3, 0)) != BLKmode
              && can_reverse_comparison_p (temp3, insn))
            {
              rtx temp6, target = 0, seq, init_insn = 0, init = temp2;