aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-09-24 14:23:40 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-09-24 15:21:11 +0200
commit2114243c23ec5168cd54633cd4995ab123d92573 (patch)
tree4202530aac4650f08aa8b4cbab3a430699e58431
parentde6fe690db32689ba5e5c6f551672a19e6cae5d4 (diff)
downloadgcc-2114243c23ec5168cd54633cd4995ab123d92573.zip
gcc-2114243c23ec5168cd54633cd4995ab123d92573.tar.gz
gcc-2114243c23ec5168cd54633cd4995ab123d92573.tar.bz2
Simplify range-op shift mask generation
The following reduces the number of wide_ints built which show up in the profile for PR114855 as the largest remaining bit at -O1. * range-op.cc (operator_rshift::op1_range): Use wi::mask instead of shift and not.
-rw-r--r--gcc/range-op.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index c576f68..3f5cf08 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -2863,7 +2863,7 @@ operator_rshift::op1_range (irange &r,
// OP1 is anything from 0011 1000 to 0011 1111. That is, a
// range from LHS<<3 plus a mask of the 3 bits we shifted on the
// right hand side (0x07).
- wide_int mask = wi::bit_not (wi::lshift (wi::minus_one (prec), shift));
+ wide_int mask = wi::mask (shift.to_uhwi (), false, prec);
int_range_max mask_range (type,
wi::zero (TYPE_PRECISION (type)),
mask);