This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for 3029057
- From: Dale Johannesen <dalej at apple dot com>
- To: Samuel Figueroa <figueroa at apple dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 Sep 2002 13:56:27 -0700
- Subject: Re: Fix for 3029057
On Thursday, September 5, 2002, at 01:34 PM, Samuel Figueroa wrote:
This exact patch was one that I tested before coming up with the patch
I put in Radar. In the end, I omitted the second hunk because it
seemed superfluous, but when I looked at the code back then, I could
not see any reason why it could cause a problem to leave it in.
Well, now it crashes in a later phase:
M2X_Encode/VEO/VEO_HME_L0_P_HalfPel.c: In function
`search_halfpel_frame':
M2X_Encode/VEO/VEO_HME_L0_P_HalfPel.c:224: internal compiler error:
Internal compiler error in force_nonfallthru_and_redirect, at
cfgrtl.c:1017
But the patch below is right as far as you know?
On Thursday, September 5, 2002, at 12:05 PM, Dale Johannesen wrote:
While I was away Sam ran into a problem in Altivec epilog generation,
and with Mike's help came up with a fix (see Radar). Unfortunately
this fix doesn't work on the current TOT. I think it is the case that
a later pass doesn't expect two adjacent branches without a label
in between, so the RT is just to not emit the second (unreachable)
branch
when emitting the epilog rather than wait for a later pass to do it.
I haven't tested this extensively yet; it works on Sam's example and
Skidmarks. I'll do a bootstrap before committing.
Index: rs6000.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.170
diff -u -d -b -w -r1.170 rs6000.c
--- rs6000.c 2002/09/03 23:44:44 1.170
+++ rs6000.c 2002/09/05 19:02:17
@@ -13808,6 +13808,9 @@
/* Prevent any attempt to delete the setting of R0 or R10! */
RTVEC_ELT (p, j++) = gen_rtx_USE (VOIDmode, gen_rtx_REG
(reg_mode, 0));
RTVEC_ELT (p, j++) = gen_rtx_USE (VOIDmode, gen_rtx_REG
(reg_mode, 10));
+ if (vrsave == branch)
+ emit_jump_insn (gen_rtx_PARALLEL (VOIDmode, p));
+ else
emit_insn (gen_rtx_PARALLEL (VOIDmode, p));
/* Get the old lr if we saved it. */
@@ -13860,7 +13863,8 @@
: gen_adddi3 (sp_reg_rtx, sp_reg_rtx, sa));
}
- if (!sibcall)
+ /* APPLE LOCAL Altivec related */
+ if (!sibcall && vrsave != branch)
{
rtvec p;
if (! restoring_FPRs_inline)