From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27094 invoked by alias); 6 Jul 2005 15:18:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27079 invoked by uid 48); 6 Jul 2005 15:18:23 -0000 Date: Wed, 06 Jul 2005 15:18:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050706151821.22325.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/22325] New: missed optimization in loop X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg00562.txt.bz2 List-Id: The following two functions should be the same: int foo(int a) { int i; for (i=0; i<200; i++) { a = a + 5; } return a; } int foo(int a) { int i; for (i=0; i<200; i++) ; return a+5*200; } The RTL optimizers catch this on ppc but not on x86. -- Summary: missed optimization in loop Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22325