------- Comment #27 from dberlin at gcc dot gnu dot org 2008-10-20 16:22 ------- Subject: Re: [4.4 Regression] calculix gets wrong answer for -O1 -ffast-math
Err, works for me with -O2 -ffast-math Replaced D.1587_48 - D.1591_50 with prephitmp.17_60 in D.1600_23 = D.1587_48 - D.1591_50; Replaced ABS_EXPR <D.1600_23> with prephitmp.17_62 in D.1601_24 = ABS_EXPR <D.1600_23>; Replaced __builtin_pow (cn_35, 2.0e+0) with 1.0e+0 in D.1583_36 = __builtin_pow (cn_35, 2.0e+0); Replaced 1.0e+0 - D.1583_36 with 0.0 in D.1584_37 = 1.0e+0 - D.1583_36; Replaced __builtin_sqrt (D.1584_37) with 0.0 in D.1585_38 = __builtin_sqrt (D.1584_37); Replaced __builtin_atan2 (D.1585_38, cn_35) with prephitmp.17_1 in D.1586_39 = __builtin_atan2 (D.1585_38, cn_35); and -O2 -funsafe-math-optimizations Replaced D.1587_48 - D.1591_50 with prephitmp.17_60 in D.1600_23 = D.1587_48 - D.1591_50; Replaced ABS_EXPR <D.1600_23> with prephitmp.17_62 in D.1601_24 = ABS_EXPR <D.1600_23>; Replaced __builtin_pow (cn_35, 2.0e+0) with 1.0e+0 in D.1583_36 = __builtin_pow (cn_35, 2.0e+0); Replaced 1.0e+0 - D.1583_36 with 0.0 in D.1584_37 = 1.0e+0 - D.1583_36; Replaced __builtin_sqrt (D.1584_37) with 0.0 in D.1585_38 = __builtin_sqrt (D.1584_37); Replaced __builtin_atan2 (D.1585_38, cn_35) with prephitmp.17_1 in D.1586_39 = __builtin_atan2 (D.1585_38, cn_35); Are you sure you updated? On Mon, Oct 20, 2008 at 11:10 AM, jakub at gcc dot gnu dot org <[EMAIL PROTECTED]> wrote: > > > ------- Comment #26 from jakub at gcc dot gnu dot org 2008-10-20 15:10 > ------- > On the #c11 testcase with -O2 -funsafe-math-optimizations I still see > # cn_38 = PHI <-1.0e+0(4), 1.0e+0(11)> > D.1262_39 = __builtin_pow (cn_38, 2.0e+0); > D.1263_41 = 1.0e+0 - D.1262_39; > D.1264_42 = __builtin_sqrt (D.1263_41); > before and after PRE, so the recent pre change doesn't handle it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37449