public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107879] [13 Regression] ffmpeg-4 test suite fails on FPU arithmetics Date: Mon, 28 Nov 2022 13:57:02 +0000 [thread overview] Message-ID: <bug-107879-4-hIXcTrcAdD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107879-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107879 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- It is the foperator_mult::op{1,2}_range and can be seen even on: double foo (double x, double y) { double z = x * y; if (z == 0.0) return x; return 42.0; } testcase. 2->3 (T) x_2(D) : [frange] double [-0.0 (-0x0.0p+0), 0.0 (0x0.0p+0)] 2->3 (T) y_3(D) : [frange] double [-0.0 (-0x0.0p+0), 0.0 (0x0.0p+0)] 2->3 (T) z_4 : [frange] double [-0.0 (-0x0.0p+0), 0.0 (0x0.0p+0)] On the true edge of z == 0.0, we have [-0., 0.] range for z_4, that is correct, but getting from lhs [-0., 0.] and op2 range VARYING to [-0., 0.] is wrong. We get that because we compute the range in that case as [-0., 0.] / VARYING, and for division it is actually correct, [-0., 0.] divided by anything non-NAN non-zero is still [-0., 0.], and [-0., 0.] divided by [-0., 0.] is NAN. Plus we have the (IMHO still correct) implication that if a result is not NAN, then neither operand could be NAN. So I'm afraid back to the drawing board on when we can use division for multiplication reverse ranges and when we can use multiplication for division reverse ranges (and whether it is ok to use minus/plus for plus/minus reverse operations).
next prev parent reply other threads:[~2022-11-28 13:57 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-26 15:46 [Bug middle-end/107879] New: " slyfox at gcc dot gnu.org 2022-11-26 16:23 ` [Bug middle-end/107879] " amonakov at gcc dot gnu.org 2022-11-26 16:40 ` [Bug tree-optimization/107879] " pinskia at gcc dot gnu.org 2022-11-26 17:20 ` slyfox at gcc dot gnu.org 2022-11-28 7:37 ` rguenth at gcc dot gnu.org 2022-11-28 10:55 ` jakub at gcc dot gnu.org 2022-11-28 13:57 ` jakub at gcc dot gnu.org [this message] 2022-11-28 19:09 ` jakub at gcc dot gnu.org 2022-11-28 22:44 ` slyfox at gcc dot gnu.org 2022-12-05 10:19 ` cvs-commit at gcc dot gnu.org 2022-12-05 10:36 ` jakub at gcc dot gnu.org 2022-12-05 11:31 ` amonakov at gcc dot gnu.org 2022-12-05 11:33 ` marxin at gcc dot gnu.org 2022-12-08 22:44 ` slyfox at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107879-4-hIXcTrcAdD@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).