This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/25248] [4.1/4.2 Regression] 2.6.15-rc4 arch/powerpc/mm/hash_utils_64.c miscompiled
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Dec 2005 13:59:27 -0000
- Subject: [Bug middle-end/25248] [4.1/4.2 Regression] 2.6.15-rc4 arch/powerpc/mm/hash_utils_64.c miscompiled
- References: <bug-25248-1216@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from rguenth at gcc dot gnu dot org 2005-12-06 13:59 -------
IVOPTs truncates pstartD.1866_10 down to int, which is wrong:
htab_bolt_mapping (pstartD.1866, cntD.1867)
{
unsigned intD.3 D.1959;
long unsigned intD.4 D.1960;
long unsigned intD.4 ivtmp.50D.1954;
unsigned intD.3 stepD.1871;
long unsigned intD.4 iD.1870;
intD.0 D.1881;
long unsigned intD.4 D.1880;
long unsigned intD.4 D.1879;
unsigned intD.3 cond.12D.1878;
intD.0 D.1877;
intD.0 shift.11D.1876;
unsigned intD.3 shift.10D.1875;
<bb 0>:
shift.10D.1875_5 = shiftD.1865;
shift.11D.1876_6 = (intD.0) shift.10D.1875_5;
D.1877_7 = 1 << shift.11D.1876_6;
stepD.1871_8 = (unsigned intD.3) D.1877_7;
if (cntD.1867_11 != 0) goto <L9>; else goto <L4>;
<L9>:;
ivtmp.50D.1954_21 = (long unsigned intD.4) stepD.1871_8;
D.1959_23 = (unsigned intD.3) pstartD.1866_10;
D.1960_26 = (long unsigned intD.4) D.1959_23;
ivtmp.50D.1954_3 = D.1960_26 - 000000000;
# ivtmp.50D.1954_1 = PHI <ivtmp.50D.1954_2(5), ivtmp.50D.1954_3(1)>;
# iD.1870_28 = PHI <iD.1870_18(5), 0(1)>;
<L0>:;
cond.12D.1878_15 = condD.1864;
if (cond.12D.1878_15 != 0) goto <L1>; else goto <L2>;
before we have (cunroll):
<bb 0>:
shift.10D.1875_5 = shiftD.1865;
shift.11D.1876_6 = (intD.0) shift.10D.1875_5;
D.1877_7 = 1 << shift.11D.1876_6;
stepD.1871_8 = (unsigned intD.3) D.1877_7;
if (cntD.1867_11 != 0) goto <L9>; else goto <L4>;
<L9>:;
# iD.1870_28 = PHI <iD.1870_18(5), 0(1)>;
# pstartD.1866_27 = PHI <pstartD.1866_17(5), pstartD.1866_10(1)>;
<L0>:;
cond.12D.1878_15 = condD.1864;
if (cond.12D.1878_15 != 0) goto <L1>; else goto <L2>;
Zdenek surely knows where this happens and how to best fix it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25248