This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix alphaev56 bootstrap
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 May 2002 13:11:44 -0700
- Subject: fix alphaev56 bootstrap
A (return) pattern categorized as an integer branch instruction, which
triggers the test in the ev5 ilogcmp->ibr bypass. But a return isn't
single_set so we aborted.
Rewritten to be more lenient in what we accept for this test.
r~
* recog.c (if_test_bypass_p): Accept multiple set insns for OUT,
and any jump or call for IN.
Index: recog.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/recog.c,v
retrieving revision 1.149
diff -c -p -d -r1.149 recog.c
*** recog.c 5 May 2002 21:51:04 -0000 1.149
--- recog.c 6 May 2002 20:05:53 -0000
*************** store_data_bypass_p (out_insn, in_insn)
*** 3329,3337 ****
return true;
}
! /* True if the dependency between OUT_INSN and IN_INSN is in the
! IF_THEN_ELSE condition, and not the THEN or ELSE branch.
! Both OUT_INSN and IN_INSN must be single_set. */
int
if_test_bypass_p (out_insn, in_insn)
--- 3329,3338 ----
return true;
}
! /* True if the dependency between OUT_INSN and IN_INSN is in the IF_THEN_ELSE
! condition, and not the THEN or ELSE branch. OUT_INSN may be either a single
! or multiple set; IN_INSN should be single_set for truth, but for convenience
! of insn categorization may be any JUMP or CALL insn. */
int
if_test_bypass_p (out_insn, in_insn)
*************** if_test_bypass_p (out_insn, in_insn)
*** 3339,3358 ****
{
rtx out_set, in_set;
- out_set = single_set (out_insn);
- if (! out_set)
- abort ();
-
in_set = single_set (in_insn);
if (! in_set)
! abort ();
if (GET_CODE (SET_SRC (in_set)) != IF_THEN_ELSE)
return false;
! if (reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 1))
! || reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 2)))
! return false;
return true;
}
--- 3340,3388 ----
{
rtx out_set, in_set;
in_set = single_set (in_insn);
if (! in_set)
! {
! if (GET_CODE (in_insn) == JUMP_INSN || GET_CODE (in_insn) == CALL_INSN)
! return false;
! abort ();
! }
if (GET_CODE (SET_SRC (in_set)) != IF_THEN_ELSE)
return false;
+ in_set = SET_SRC (in_set);
! out_set = single_set (out_insn);
! if (out_set)
! {
! if (reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 1))
! || reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 2)))
! return false;
! }
! else
! {
! rtx out_pat;
! int i;
!
! out_pat = PATTERN (out_insn);
! if (GET_CODE (out_pat) != PARALLEL)
! abort ();
!
! for (i = 0; i < XVECLEN (out_pat, 0); i++)
! {
! rtx exp = XVECEXP (out_pat, 0, i);
!
! if (GET_CODE (exp) == CLOBBER)
! continue;
!
! if (GET_CODE (exp) != SET)
! abort ();
!
! if (reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 1))
! || reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 2)))
! return false;
! }
! }
return true;
}