diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-04-29 14:38:52 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-04-29 16:59:00 +0200 |
commit | 4d54dcd0b255b32491a675941bc0748a9f435538 (patch) | |
tree | 5da3adea2a8ee46348844b69dc1d007e9527a059 | |
parent | 423845c7db5858f5821d848cb582e61c6d605770 (diff) | |
download | gcc-4d54dcd0b255b32491a675941bc0748a9f435538.zip gcc-4d54dcd0b255b32491a675941bc0748a9f435538.tar.gz gcc-4d54dcd0b255b32491a675941bc0748a9f435538.tar.bz2 |
Remove redundant code from operator_bitwise_and::op1_range.
-rw-r--r-- | gcc/range-op.cc | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/gcc/range-op.cc b/gcc/range-op.cc index 4e57298..42402ee 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -2255,28 +2255,18 @@ operator_bitwise_and::op1_range (irange &r, tree type, if (types_compatible_p (type, boolean_type_node)) return op_logical_and.op1_range (r, type, lhs, op2); - if (lhs.num_pairs () == 1) - { - simple_op1_range_solver (r, type, lhs, op2); - if (r.undefined_p ()) - set_nonzero_range_from_mask (r, type, lhs); - return !r.varying_p (); - } - else + r.set_undefined (); + for (unsigned i = 0; i < lhs.num_pairs (); ++i) { - r.set_undefined (); - for (unsigned i = 0; i < lhs.num_pairs (); ++i) - { - widest_irange chunk (lhs.type (), - lhs.lower_bound (i), - lhs.upper_bound (i)); - widest_irange res; - simple_op1_range_solver (res, type, chunk, op2); - r.union_ (res); - } - if (r.undefined_p ()) - set_nonzero_range_from_mask (r, type, lhs); + widest_irange chunk (lhs.type (), + lhs.lower_bound (i), + lhs.upper_bound (i)); + widest_irange res; + simple_op1_range_solver (res, type, chunk, op2); + r.union_ (res); } + if (r.undefined_p ()) + set_nonzero_range_from_mask (r, type, lhs); return true; } |