[Bug rtl-optimization/26232] New: cc0 targets broken; loop-invariants-move code doesn't handle cc0.
hp at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 12 16:39:00 GMT 2006
Build last succeeded with revision 110787.
Building cris-axis-elf with revision 110879 fails building newlib:
/home/hp/combined/cris-sim/./gcc/xgcc -B/home/hp/combined/cris-sim/./gcc/
-nostdinc -B/home/hp/combined/cris-sim/cris-elf/v10/new\
lib/ -isystem /home/hp/combined/cris-sim/cris-elf/v10/newlib/targ-include
-isystem /home/hp/combined/combined/newlib/libc/include\
-B/usr/local/cris-elf/bin/ -B/usr/local/cris-elf/lib/ -isystem
/usr/local/cris-elf/include -isystem /usr/local/cris-elf/sys-incl\
ude -L/home/hp/combined/cris-sim/./ld -march=v10 -mbest-lib-options
-DPACKAGE=\"newlib\" -DVERSION=\"1.14.0\" -I. -I/home/hp/co\
mbined/combined/newlib/libc/search -O2 -DHAVE_RENAME -DHAVE_GETTIMEOFDAY
-D_USE_WRITE -DCOMPACT_CTYPE -fno-builtin -O2 -g -\
O2 -march=v10 -mbest-lib-options -c
/home/hp/combined/combined/newlib/libc/search/qsort.c
/home/hp/combined/combined/newlib/libc/search/qsort.c: In function 'qsort':
/home/hp/combined/combined/newlib/libc/search/qsort.c:222: internal compiler
error: in int_mode_for_mode, at stor-layout.c:250
Looking closer, it's a set of cc0 that the loop-invariants-move code tries to
move, but thankfully the call to emit_move_insn horks. The cause of the
exposure is that -fmove-loop-invariants is now enabled by default; revision
110787 and revision 108225 also fail if given -fmove-loop-invariants.
Patch testing in progress, for reference cutnpasted below.
I'm not sure it's best to stop the move this late, but let's discuss this
when I submit the patch to gcc-patches@.
Index: loop-invariant.c
===================================================================
--- loop-invariant.c (revision 110879)
+++ loop-invariant.c (working copy)
@@ -1076,6 +1076,12 @@ move_invariant_reg (struct loop *loop, u
|| !repr->move)
return;
+#if HAVE_cc0
+ /* We can't move a CC0 setter without the user. */
+ if (sets_cc0_p (inv->insn))
+ return;
+#endif
+
/* If this is a representative of the class of equivalent invariants,
really move the invariant. Otherwise just replace its use with
the register used for the representative. */
--
Summary: cc0 targets broken; loop-invariants-move code doesn't
handle cc0.
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: hp at gcc dot gnu dot org
ReportedBy: hp at gcc dot gnu dot org
GCC target triplet: cris-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26232
More information about the Gcc-bugs
mailing list