This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24568] [meta-bug] Missed optimization: trivialization of silly code
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Mar 2007 12:29:35 -0000
- Subject: [Bug tree-optimization/24568] [meta-bug] Missed optimization: trivialization of silly code
- References: <bug-24568-8513@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from steven at gcc dot gnu dot org 2007-03-29 13:29 -------
For the original test case, our current output before expand (i.e. the
final_cleanup dump) on hosts where sizeof(long)==sizeof(int) is this:
;; Function convertToMinutes (convertToMinutes)
convertToMinutes (milliDiff)
{
int minutesDiff.24;
int minutesDiff;
<bb 2>:
if (milliDiff < 0) goto <L0>; else goto <L1>;
<L0>:;
minutesDiff = -milliDiff / 60000;
minutesDiff.24 = -minutesDiff;
goto <bb 7> (<L6>);
<L1>:;
if (milliDiff == 0) goto <L13>; else goto <L3>;
<L13>:;
minutesDiff.24 = 0;
goto <bb 7> (<L6>);
Invalid sum of outgoing probabilities 0.0%
Invalid sum of incoming frequencies 2000, should be 0
<L3>:;
minutesDiff.24 = milliDiff / 60000;
Invalid sum of incoming frequencies 8000, should be 10000
<L6>:;
return minutesDiff.24;
}
Note that on hosts where sizeof(long) != sizeof(int), you can't optimize the
original test case to i/60000.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2006-02-26 19:10:03 |2007-03-29 13:29:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24568