This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/20134] [4.0 Regression] 176.gcc miscompare with -m64 after DOM change
- 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: 22 Feb 2005 00:55:35 -0000
- Subject: [Bug rtl-optimization/20134] [4.0 Regression] 176.gcc miscompare with -m64 after DOM change
- References: <20050222001243.20134.janis@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-22 00:55 -------
Does this testcase fail for you if so can you run a regression hunter on it for the real patch:
/* This function gets the wrong answer (63 instead of 31) when compiled
with "-m64 -O1" on powerpc64-linux. */
extern void abort (void);
/* From 176.gcc in SPEC CPU2000. */
int
exact_log2_wide (x)
register unsigned int x;
{
unsigned int x4;
register int log;
if (x == 0) goto L6; else goto L0;
L0:;
if (x != (x & -x)) goto L6; else goto L8;
L17:;
log = 0;
L3:;
log = log + 1;
x4 = x4 >> 1;
if (x4 != 0) goto L3; else goto L18;
L6:;
log = -1;
L18:;
return log;
L8:;
x4 = x >> 1;
if (x4 != 0) goto L17; else goto L19;
L19:;
log = 0;
goto L18;
}
int
main ()
{
if (exact_log2_wide ((int) -2147483648) != 31)
abort ();
return 0;
}
Please use -O1 -fno-tree-dominator-opts as we know this is the most optimial code anyways.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |rtl-optimization
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20134