------- Comment #12 from toon at moene dot org  2009-11-24 18:03 -------
> Any tricks I have missed?

Yes - we could provide for loop versioning in the front end.

I.e., generate code like:

IF (M3 > 0) THEN
   ... compute loop count ...
   ... perform loop ...
ELSE IF (M3 < 0) THEN
   ... compute loop count ...
   ... perform loop ...
ELSE
   ABORT "M3 MUST NOT BE ZERO"
ENDIF

And then hope that Value Range Propagation and InterProcedural Analysis will
throw away 2 of the 3 branches of this loop because it is able to determine the
sign of M3.

<evil grin>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42131

Reply via email to