[Bug tree-optimization/126467] [13/14/15/16/17 Regression] wrong code with folding 0.0 - x
"amonakov at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126467 --- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> --- What is wrong here is passing plain @1 instead of (negate @1) as the second argument of fold_real_zero_addition_p. @1 is __builtin_fabs(...) which cannot be -0.0, so fold_real_zero_addition_p reports that @1 + 0.0 reduces to @1 (and indeed it does under default rounding), but what we actually want to check is that (negate @1) + 0.0 reduces to (negate @1) (which is not true).