diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-06-19 15:26:01 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-06-19 15:26:01 +0200 |
commit | f67c1bddaf9f855a7d03d8c078fd734de96f7ade (patch) | |
tree | 739eb56c0c0fd251975b314bc4f721cedb32c73e | |
parent | 7cefb069fa9d631566a201ad71fa1a370ab04d17 (diff) | |
download | gcc-f67c1bddaf9f855a7d03d8c078fd734de96f7ade.zip gcc-f67c1bddaf9f855a7d03d8c078fd734de96f7ade.tar.gz gcc-f67c1bddaf9f855a7d03d8c078fd734de96f7ade.tar.bz2 |
Minor cleanups to range-op.
-rw-r--r-- | gcc/range-op.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/range-op.cc b/gcc/range-op.cc index b3fb57f..251f1f5 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -306,23 +306,16 @@ create_possibly_reversed_range (irange &r, tree type, r = widest_irange (type, new_lb, new_ub); } -// Return a value_range instance that is a boolean TRUE. +// Return an irange instance that is a boolean TRUE. static inline int_range<1> range_true (tree type) { unsigned prec = TYPE_PRECISION (type); return int_range<1> (type, wi::one (prec), wi::one (prec)); -#if 0 - // ?? - // Build ~[0,0] instead of [1,1] because Ada booleans may be larger - // than 1-bit. - tree zero = build_zero_cst (type); - return int_range<1> (zero, zero, VR_ANTI_RANGE); -#endif } -// Return a value_range instance that is a boolean FALSE. +// Return an irange instance that is a boolean FALSE. static inline int_range<1> range_false (tree type) @@ -331,7 +324,7 @@ range_false (tree type) return int_range<1> (type, wi::zero (prec), wi::zero (prec)); } -// Return a value_range that covers both true and false. +// Return an irange that covers both true and false. static inline int_range<1> range_true_and_false (tree type) @@ -1605,7 +1598,7 @@ operator_rshift::op1_range (irange &r, // Folding the original operation may discard some impossible // ranges from the LHS. widest_irange lhs_refined; - op_rshift.fold_range (lhs_refined, type, value_range (type), op2); + op_rshift.fold_range (lhs_refined, type, int_range<1> (type), op2); lhs_refined.intersect (lhs); widest_irange shift_range (shift, shift); widest_irange lb, ub; |