* cse.c (cse_insn): When changing (set (pc) (reg)) to
(set (pc) (label_ref)), verify the change creates a valid insn.
From-SVN: r31407
Fri Jan 14 00:28:06 2000 Jeffrey A Law (law@cygnus.com)
+ * cse.c (cse_insn): When changing (set (pc) (reg)) to
+ (set (pc) (label_ref)), verify the change creates a valid insn.
+
* fr30.c (call_operand): Tighten and rework to match rules for
call RTL expressions.
* fr30.h (PREDICATE_CODES, case call_operand): Only allow MEMs.
trial = gen_rtx_LABEL_REF (Pmode, get_label_after (trial));
- SET_SRC (sets[i].rtl) = trial;
- cse_jumps_altered = 1;
+ if (trial == pc_rtx)
+ {
+ SET_SRC (sets[i].rtl) = trial;
+ cse_jumps_altered = 1;
+ break;
+ }
+
+ /* We must actually validate the change. Consider a target
+ where unconditional jumps are more complex than
+ (set (pc) (label_ref)) such as the fr30. */
+ if (validate_change (insn, &SET_SRC (sets[i].rtl), trial, 0))
+ cse_jumps_altered = 1;
break;
}