This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Your ifcvt patch breaks bootstrap
- To: Daniel Berlin <dan at cgsoftware dot com>
- Subject: Re: Your ifcvt patch breaks bootstrap
- From: Richard Henderson <rth at redhat dot com>
- Date: Sat, 14 Jul 2001 17:01:55 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <871ynjnqzk.fsf@cgsoftware.com>
On Sat, Jul 14, 2001 at 05:24:47PM -0400, Daniel Berlin wrote:
> trap_bb is the exit block, so GET_CODE (insn) on the head insn (which
> is NULL), crashes.
This fixes the one failure; a full powerpc cross-build is
still underway.
r~
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.54
diff -c -p -d -r1.54 ifcvt.c
*** ifcvt.c 2001/07/14 18:39:15 1.54
--- ifcvt.c 2001/07/14 23:58:56
*************** find_cond_trap (test_bb, then_edge, else
*** 2018,2023 ****
--- 2018,2028 ----
else
return FALSE;
+ /* Don't confuse a conditional return with something we want to
+ optimize here. */
+ if (trap_bb == EXIT_BLOCK_PTR)
+ return FALSE;
+
/* The only instruction in the THEN block must be the trap. */
trap = first_active_insn (trap_bb);
if (! (trap == trap_bb->end