This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Blackfin patch: Fix doloop-related ICE's


Not sure why this didn't show up before, but loop-doloop is being naughty and not checking the predicates of the doloop_end insn it's trying to generate, which can lead to recog failures e.g. if the loop counter is QImode.

Committed the patch below as 122371.


Bernd


--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, Vincent Roche, Joseph E. McDonough
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 122370)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* config/bfin/bfin.md (doloop_end): FAIL if counter reg isn't SImode.
+
 2007-02-27  Andreas Schwab  <schwab@suse.de>
 
 	* Makefile.in (TEXI_GCCINSTALL_FILES): Add gcc-common.texi.
Index: config/bfin/bfin.md
===================================================================
--- config/bfin/bfin.md	(revision 122331)
+++ config/bfin/bfin.md	(working copy)
@@ -1640,10 +1640,12 @@ (define_expand "doloop_end"
 	      (clobber (match_scratch:SI 5 ""))])]
   ""
 {
+  /* The loop optimizer doesn't check the predicates... */
+  if (GET_MODE (operands[0]) != SImode)
+    FAIL;
   /* Due to limitations in the hardware (an initial loop count of 0
      does not loop 2^32 times) we must avoid to generate a hardware
      loops when we cannot rule out this case.  */
-
   if (!flag_unsafe_loop_optimizations
       && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) >= 0xFFFFFFFF)
     FAIL;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]