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

https://gcc.gnu.org/g:5346a2fcceb118fce1041646788a20fea6698c34

commit r14-2779-g5346a2fcceb118fce1041646788a20fea6698c34
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Jul 25 12:35:08 2023 -0400

    [range-ops] Handle bitmasks for ABS_EXPR.
    
    gcc/ChangeLog:
    
            * range-op-mixed.h (class operator_abs): Add update_bitmask.
            * range-op.cc (operator_abs::update_bitmask): New.

Diff:
---
 gcc/range-op-mixed.h | 2 ++
 gcc/range-op.cc      | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/gcc/range-op-mixed.h b/gcc/range-op-mixed.h
index ead41ed0515..70550c52232 100644
--- a/gcc/range-op-mixed.h
+++ b/gcc/range-op-mixed.h
@@ -408,6 +408,8 @@ class operator_abs : public range_operator
   bool op1_range (frange &r, tree type,
 		  const frange &lhs, const frange &op2,
 		  relation_trio rel = TRIO_VARYING) const final override;
+  void update_bitmask (irange &r, const irange &lh,
+		       const irange &rh) const final override;
 private:
   void wi_fold (irange &r, tree type, const wide_int &lh_lb,
 		const wide_int &lh_ub, const wide_int &rh_lb,
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index 13ba973a08d..bfab53caea0 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -4208,6 +4208,12 @@ operator_abs::op1_range (irange &r, tree type,
   return true;
 }
 
+void
+operator_abs::update_bitmask (irange &r, const irange &lh,
+			      const irange &rh) const
+{
+  update_known_bitmask (r, ABS_EXPR, lh, rh);
+}
 
 class operator_absu : public range_operator
 {

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

only message in thread, other threads:[~2023-07-26  8:43 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:43 [gcc r14-2779] [range-ops] Handle bitmasks for ABS_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).