public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108068] [10/11 Regression] decimal floating point signed zero is not honored Date: Tue, 02 May 2023 20:13:16 +0000 [thread overview] Message-ID: <bug-108068-4-PfRNuLXqs6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108068-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108068 --- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:d8f95474581843c605bb97ba83d482d642da3a1b commit r11-10695-gd8f95474581843c605bb97ba83d482d642da3a1b Author: Jakub Jelinek <jakub@redhat.com> Date: Fri Dec 23 16:12:21 2022 +0100 tree-ssa-dom: can_infer_simple_equiv fixes [PR108068] As reported in the PR, tree-ssa-dom.cc uses real_zerop call to find if a floating point constant is zero and it shouldn't try to infer equivalences from comparison against it if signed zeros are honored. This doesn't work at all for decimal types, because real_zerop always returns false for them (one can have different representations of decimal zero beyond -0/+0), and it doesn't work for vector compares either, as real_zerop checks if all elements are zero, while we need to avoid infering equivalences from comparison against vector constants which have at least one zero element in it (if signed zeros are honored). Furthermore, as mentioned by Joseph, for decimal types many other values aren't singleton. So, this patch stops infering anything if element mode is decimal, and otherwise uses instead of real_zerop a new function, real_maybe_zerop, which will work even for decimal types and for complex or vector will return true if any element is or might be zero (so it returns true for anything but constants for now). 2022-12-23 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/108068 * tree.h (real_maybe_zerop): Declare. * tree.c (real_maybe_zerop): Define. * tree-ssa-dom.c (record_edge_info): Use it instead of real_zerop or TREE_CODE (op1) == SSA_NAME || real_zerop. Always set can_infer_simple_equiv to false for decimal floating point types. * gcc.dg/dfp/pr108068.c: New test. (cherry picked from commit fd1b0aefda5b65f3f841ca6e61ccea6a72daa060)
next prev parent reply other threads:[~2023-05-02 20:13 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-12 8:53 [Bug c/108068] New: decimal " ntysdd at qq dot com 2022-12-12 16:54 ` [Bug tree-optimization/108068] [10/11/12/13 Regression] decimal floating point " pinskia at gcc dot gnu.org 2022-12-21 12:11 ` rguenth at gcc dot gnu.org 2022-12-21 15:08 ` jakub at gcc dot gnu.org 2022-12-21 15:45 ` jakub at gcc dot gnu.org 2022-12-21 17:37 ` joseph at codesourcery dot com 2022-12-21 17:53 ` jakub at gcc dot gnu.org 2022-12-22 7:12 ` rguenth at gcc dot gnu.org 2022-12-22 10:36 ` jakub at gcc dot gnu.org 2022-12-22 10:40 ` jakub at gcc dot gnu.org 2022-12-22 11:36 ` rguenther at suse dot de 2022-12-23 15:22 ` cvs-commit at gcc dot gnu.org 2022-12-23 15:23 ` [Bug tree-optimization/108068] [10/11/12 " jakub at gcc dot gnu.org 2023-02-10 17:45 ` cvs-commit at gcc dot gnu.org 2023-02-10 17:58 ` [Bug tree-optimization/108068] [10/11 " jakub at gcc dot gnu.org 2023-05-02 20:13 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-03 9:33 ` [Bug tree-optimization/108068] [10 " jakub at gcc dot gnu.org 2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org 2023-05-04 7:22 ` jakub 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-108068-4-PfRNuLXqs6@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).