From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30906 invoked by alias); 29 Mar 2007 12:29:48 -0000 Received: (qmail 30704 invoked by uid 48); 29 Mar 2007 12:29:35 -0000 Date: Thu, 29 Mar 2007 12:29:00 -0000 Message-ID: <20070329122935.30703.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/24568] [meta-bug] Missed optimization: trivialization of silly code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "steven at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg02700.txt.bz2 ------- 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; : if (milliDiff < 0) goto ; else goto ; :; minutesDiff = -milliDiff / 60000; minutesDiff.24 = -minutesDiff; goto (); :; if (milliDiff == 0) goto ; else goto ; :; minutesDiff.24 = 0; goto (); Invalid sum of outgoing probabilities 0.0% Invalid sum of incoming frequencies 2000, should be 0 :; minutesDiff.24 = milliDiff / 60000; Invalid sum of incoming frequencies 8000, should be 10000 :; 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