XEXP (comparison, 0),
XEXP (comparison, 1), insn);
}
+
+/* Return comparison with reversed code of EXP.
+ Return NULL_RTX in case we fail to do the reversal. */
+rtx
+reversed_comparison (rtx exp, enum machine_mode mode)
+{
+ enum rtx_code reversed_code = reversed_comparison_code (exp, NULL_RTX);
+ if (reversed_code == UNKNOWN)
+ return NULL_RTX;
+ else
+ return simplify_gen_relational (reversed_code, mode, VOIDmode,
+ XEXP (exp, 0), XEXP (exp, 1));
+}
+
\f
/* Given an rtx-code for a comparison, return the code for the negated
comparison. If no such code exists, return UNKNOWN.
if (num_validated_changes () == ochanges)
return 0;
- return redirect_jump_1 (jump, nlabel);
+ /* redirect_jump_1 will fail of nlabel == olabel, and the current use is
+ in Pmode, so checking this is not merely an optimization. */
+ return nlabel == JUMP_LABEL (jump) || redirect_jump_1 (jump, nlabel);
}
/* Invert the condition of the jump JUMP, and make it jump to label