This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26180] [4.1/4.2 Regression] optimization regression on x86-SunOS
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Feb 2006 00:55:04 -0000
- Subject: [Bug tree-optimization/26180] [4.1/4.2 Regression] optimization regression on x86-SunOS
- References: <bug-26180-6067@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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