From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17266 invoked by alias); 9 Feb 2006 00:55:08 -0000 Received: (qmail 16453 invoked by uid 48); 9 Feb 2006 00:55:04 -0000 Date: Thu, 09 Feb 2006 00:55:00 -0000 Message-ID: <20060209005504.16449.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/26180] [4.1/4.2 Regression] optimization regression on x86-SunOS In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" 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 X-SW-Source: 2006-02/txt/msg00866.txt.bz2 List-Id: ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-09 00:55 ------- VRP is messing up: w_13: [0, 1] EQUIVALENCES: { } (0 elements) w_13 = x3_11 * y3_12; x3_11: [0, 2147483647] EQUIVALENCES: { } (0 elements) y3_12: [0, 2147483647] EQUIVALENCES: { } (0 elements) That is wrong. Testcase which fails everywhere: void abort(void); int bar(int x, int y) { int x1, y1; int x2, y2; unsigned int x3, y3, w; int z = 1; x1 = (x < (1 << 30)); y1 = (y < (1 << 30)); if (x1) if (y1) { x2 = ((x > 0)? (x): -(x)); y2 = ((y > 0)? (y): -(y)); x3 = x2; y3 = y2; w = x3 * y3; if (w >= (1 << 30)) { z = 1; } else { z = -1; } } return z; } int main() { int x, y, z; x = 536870912; /* 2^29 */ y = 2; z = bar(x, y); if (z != 1) abort (); return 0; } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dnovillo at gcc dot gnu dot | |org Severity|normal |critical Status|UNCONFIRMED |NEW Component|regression |tree-optimization Ever Confirmed|0 |1 GCC build triplet|i386-pc-solaris2.9 | GCC host triplet|i386-pc-solaris2.9 | GCC target triplet|i386-pc-solaris2.9 |i386-*-* Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2006-02-09 00:55:04 date| | Summary|optimization regression on |[4.1/4.2 Regression] |x86-SunOS |optimization regression on | |x86-SunOS Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26180