public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112788] [14 regression] ICEs in fold_range, at range-op.cc:206 after r14-5972-gea19de921b01a6 Date: Fri, 01 Dec 2023 08:04:55 +0000 [thread overview] Message-ID: <bug-112788-4-Vn8rOeU62V@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112788-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112788 Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |linkw at gcc dot gnu.org, | |meissner at gcc dot gnu.org, | |segher at gcc dot gnu.org Last reconfirmed| |2023-12-01 --- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> --- Confirmed. A reduced test case: long double a, b, c; long double d() { return -__builtin_fmaf128_round_to_odd(c, b, a); } c.0_1 = c; b.1_2 = b; a.2_3 = a; _4 = __builtin_fmaf128_round_to_odd (c.0_1, b.1_2, a.2_3); _6 = -_4; return _6; 206├───> gcc_assert (m_operator->operand_check_p (type, lh.type (), rh.type ())); stmt: _6 = -_4; (gdb) pge lh.type() _Float128 (gdb) pge rh.type() long double The root cause is the same to what's in PR107299, TYPE_PRECISION of rh.type is 127 while that of lh.type is 128, some attempts were tried to fix this precision difference before but failed to, like: https://inbox.sourceware.org/gcc-patches/718677e7-614d-7977-312d-05a75e1fd5b4@linux.ibm.com/. ranger makes use of type precision directly instead of something like types_compatible_p. I wonder if we can introduce a target hook (or hookpod) to make ranger unrestrict this check a bit, the justification is that for float type its precision information is encoded in its underlying real_format, if two float types underlying modes are the same, the precision are actually the same. btw, the operand_check_ps seems able to call range_compatible_p?
next prev parent reply other threads:[~2023-12-01 8:04 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-30 18:54 [Bug other/112788] New: " seurer at gcc dot gnu.org 2023-11-30 18:57 ` [Bug tree-optimization/112788] " pinskia at gcc dot gnu.org 2023-12-01 7:23 ` rguenth at gcc dot gnu.org 2023-12-01 8:04 ` linkw at gcc dot gnu.org [this message] 2023-12-01 19:15 ` amacleod at redhat dot com 2023-12-03 13:28 ` tschwinge at gcc dot gnu.org 2023-12-04 1:52 ` linkw at gcc dot gnu.org 2023-12-07 8:43 ` linkw at gcc dot gnu.org 2023-12-13 2:40 ` cvs-commit at gcc dot gnu.org 2023-12-13 2:43 ` linkw 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-112788-4-Vn8rOeU62V@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).