------- Comment #4 from rguenth at gcc dot gnu dot org 2008-01-17 10:45 ------- So, we enter the recip pass with
<bb 2>: if (x_2(D) == y_3(D)) goto <bb 3>; else goto <bb 4>; <bb 3>: D.1547_4 = x_2(D) / x_2(D); D.1548_5 = D.1547_4 * x_2(D); D.1545_6 = D.1548_5 / x_2(D); <bb 4>: # D.1545_1 = PHI <D.1545_6(3), 0.0(2)> return D.1545_1; that is, we compute x/x*x/x. Recip now 'optimizes' this to reciptmp.6_10 = 1.0e+0 / x_2(D); D.1547_4 = __builtin_pow (reciptmp.6_10, 2.0e+0); D.1548_5 = D.1547_4 * x_2(D); D.1545_6 = D.1548_5 * reciptmp.6_10; which is bogus anyway. But the ICE is gone :P Well, it registers the division x_2(D)/x_2(D) twice, which also makes it a wrong-code regression. The easiest thing is probably to just not do reciprocal optimization for x / x. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34825