From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Andrew MacLeod <amacleod@redhat.com>, Aldy Hernandez <aldyh@redhat.com>
Subject: [COMMITTED] [range-ops] Handle bitmasks for ABSU_EXPR.
Date: Wed, 26 Jul 2023 10:42:18 +0200 [thread overview]
Message-ID: <20230726084224.43416-4-aldyh@redhat.com> (raw)
In-Reply-To: <20230726084224.43416-1-aldyh@redhat.com>
gcc/ChangeLog:
* range-op.cc (class operator_absu): Add update_bitmask.
(operator_absu::update_bitmask): New.
---
gcc/range-op.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index bfab53caea0..5653ca0d186 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -4221,6 +4221,8 @@ class operator_absu : public range_operator
virtual void wi_fold (irange &r, tree type,
const wide_int &lh_lb, const wide_int &lh_ub,
const wide_int &rh_lb, const wide_int &rh_ub) const;
+ virtual void update_bitmask (irange &r, const irange &lh,
+ const irange &rh) const final override;
} op_absu;
void
@@ -4258,6 +4260,13 @@ operator_absu::wi_fold (irange &r, tree type,
r = int_range<1> (type, new_lb, new_ub);
}
+void
+operator_absu::update_bitmask (irange &r, const irange &lh,
+ const irange &rh) const
+{
+ update_known_bitmask (r, ABSU_EXPR, lh, rh);
+}
+
bool
operator_negate::fold_range (irange &r, tree type,
--
2.41.0
prev parent reply other threads:[~2023-07-26 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 8:42 [COMMITTED] [range-ops] Handle bitmasks for unary operators Aldy Hernandez
2023-07-26 8:42 ` [COMMITTED] [range-ops] Handle bitmasks for BIT_NOT_EXPR Aldy Hernandez
2023-07-26 8:42 ` [COMMITTED] [range-ops] Handle bitmasks for ABS_EXPR Aldy Hernandez
2023-07-26 8:42 ` Aldy Hernandez [this message]
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=20230726084224.43416-4-aldyh@redhat.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@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: link
Be 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).