public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r15-32] Make fold_cond_with_ops use a boolean type for range_true/range_false. Date: Sun, 28 Apr 2024 19:04:10 +0000 (GMT) [thread overview] Message-ID: <20240428190410.70C893858D37@sourceware.org> (raw) https://gcc.gnu.org/g:039e88b1aea5723221e8b0b926c35afb2f96a8a9 commit r15-32-g039e88b1aea5723221e8b0b926c35afb2f96a8a9 Author: Aldy Hernandez <aldyh@redhat.com> Date: Wed Feb 7 11:27:29 2024 +0100 Make fold_cond_with_ops use a boolean type for range_true/range_false. Conditional operators are always boolean, regardless of their operands. Getting the type wrong is not currently a problem, but will be when prange's can no longer store an integer. gcc/ChangeLog: * vr-values.cc (simplify_using_ranges::fold_cond_with_ops): Remove type from range_true and range_false. Diff: --- gcc/vr-values.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc index a7e291a16e5..ff68d40c355 100644 --- a/gcc/vr-values.cc +++ b/gcc/vr-values.cc @@ -320,9 +320,9 @@ simplify_using_ranges::fold_cond_with_ops (enum tree_code code, range_op_handler handler (code); if (handler && handler.fold_range (res, type, r0, r1)) { - if (res == range_true (type)) + if (res == range_true ()) return boolean_true_node; - if (res == range_false (type)) + if (res == range_false ()) return boolean_false_node; } return NULL;
reply other threads:[~2024-04-28 19:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240428190410.70C893858D37@sourceware.org \ --to=aldyh@gcc.gnu.org \ --cc=gcc-cvs@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).