From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Jim Wilson Cc: Joern Rennecke , tege@pdc.kth.se (Torbjorn Granlund), egcs@cygnus.com Subject: Re: x86 failure on loop reversal Date: Wed, 08 Apr 1998 02:13:00 -0000 Message-id: <29422.891920176@hurl.cygnus.com> References: <199804070310.UAA12087@rtl.cygnus.com> X-SW-Source: 1998-04/msg00293.html In message < 199804070310.UAA12087@rtl.cygnus.com >you write: > The existing test is (FOO >= 0). Changing that to an unsigned test doesn't > look very useful, as it will be always true. I suggest we just avoid > reversing the loop in this case. This is rare enough, and tricky enough, > that I don't think we need to handle it. > > How about something like this? If this is OK, I will add the testcase and > check in the patch at the same time. > > Mon Apr 6 20:08:43 1998 Jim Wilson > > * loop.c (check_dbra_loop): When normalize comparison_val, add check > to verify it is non-negative. I was going to suggest the same basic change; this is probably the simplest/easiest way to fix the problem. jeff