]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[range-ops] Avoid unnecessary intersection in update_known_bitmask.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 11 Nov 2022 09:11:03 +0000 (10:11 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 11 Nov 2022 13:52:09 +0000 (14:52 +0100)
All the work for keeping the maybe nonzero masks up to date is being
done by the bit-CCP code now.  Any bitmask inherent in the range that
range-ops may have calculated has no extra information, so the
intersection is unnecessary.

gcc/ChangeLog:

* range-op.cc (update_known_bitmask): Avoid unnecessary intersection.

gcc/range-op.cc

index 9eec46441a38e1b405e111824e1b4c9aff73ec5d..0b01cf48fdfeeed48f8fe960422ddc7f6c72f6ba 100644 (file)
@@ -89,10 +89,7 @@ update_known_bitmask (irange &r, tree_code code,
   bit_value_binop (code, sign, prec, &value, &mask,
                   lh_sign, lh_prec, lh_value, lh_mask,
                   rh_sign, rh_prec, rh_value, rh_mask);
-
-  int_range<2> tmp (type);
-  tmp.set_nonzero_bits (value | mask);
-  r.intersect (tmp);
+  r.set_nonzero_bits (value | mask);
 }
 
 // Return the upper limit for a type.