public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2780] [range-ops] Handle bitmasks for ABSU_EXPR.
@ 2023-07-26  8:44 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2023-07-26  8:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:39f117d6c875bb3be87eea1ee4c28e88120773d0

commit r14-2780-g39f117d6c875bb3be87eea1ee4c28e88120773d0
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Jul 25 12:35:23 2023 -0400

    [range-ops] Handle bitmasks for ABSU_EXPR.
    
    gcc/ChangeLog:
    
            * range-op.cc (class operator_absu): Add update_bitmask.
            (operator_absu::update_bitmask): New.

Diff:
---
 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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-26  8:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26  8:44 [gcc r14-2780] [range-ops] Handle bitmasks for ABSU_EXPR Aldy Hernandez

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).