[COMMITTED,range-ops] Handle bitmasks for ABS_EXPR.
Checks
Commit Message
gcc/ChangeLog:
* range-op-mixed.h (class operator_abs): Add update_bitmask.
* range-op.cc (operator_abs::update_bitmask): New.
---
gcc/range-op-mixed.h | 2 ++
gcc/range-op.cc | 6 ++++++
2 files changed, 8 insertions(+)
@@ -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,
@@ -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
{