This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix target/15550
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 19 Jun 2004 12:11:56 -0700
- Subject: fix target/15550
The problem here is that we were pulling out the operation (an AND)
with single_set, and the emitting it again hoping things would work
out. Of course, you can do an AND without a clobber on x86, so we
generate an unrecognizable instruction.
Rejecting the sequence seemed the safest option. If we have life
info we could look into moving the instruction instead of building
a new one. Ah well.
r~
* ifcvt.c (noce_try_move): Recognize all generated instructions.
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.136
diff -c -p -d -r1.136 ifcvt.c
*** ifcvt.c 30 Dec 2003 10:40:53 -0000 1.136
--- ifcvt.c 19 Jun 2004 19:06:58 -0000
*************** noce_try_move (struct noce_if_info *if_i
*** 744,749 ****
--- 744,758 ----
seq = get_insns ();
unshare_ifcvt_sequence (if_info, seq);
end_sequence ();
+
+ /* Make sure that all of the instructions emitted are
+ recognizable. As an excersise for the reader, build
+ a general mechanism that allows proper placement of
+ required clobbers. */
+ for (y = seq; y ; y = NEXT_INSN (y))
+ if (recog_memoized (y) == -1)
+ return FALSE;
+
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATOR (if_info->insn_a));
}