cse.c (cse_insn): When changing (set (pc) (reg)) to (set (pc) (label_ref))...

* cse.c (cse_insn): When changing (set (pc) (reg)) to
        (set (pc) (label_ref)), verify the change creates a valid insn.

From-SVN: r31407
This commit is contained in:
Jeffrey A Law 2000-01-14 08:35:56 +00:00 committed by Jeff Law
parent 66ec088841
commit 516ff948a7
2 changed files with 15 additions and 2 deletions

View File

@ -1,5 +1,8 @@
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.

View File

@ -5189,8 +5189,18 @@ cse_insn (insn, libcall_insn)
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;
}