diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-04 20:38:18 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-04 20:38:18 +0000 |
commit | 8945e16bd0dc520c80b423cc0802c89ce551ff08 (patch) | |
tree | 5a95e15e7232fa20f15b1fb788468c8f6d7677a5 /gcc/tree-vrp.c | |
parent | 5341f581a660f2e4129960169a24b7e4f1063a32 (diff) | |
download | gcc-8945e16bd0dc520c80b423cc0802c89ce551ff08.tar.gz |
Simplify some force_fit_type calls in tree-vrp.c.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@204361 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 65f012d06fa..fa30d1da997 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -1617,16 +1617,8 @@ extract_range_from_assert (value_range_t *vr_p, tree expr) /* Make sure to not set TREE_OVERFLOW on the final type conversion. We are willingly interpreting large positive unsigned values as negative singed values here. */ - min = force_fit_type (TREE_TYPE (var), - wide_int::from (min, - TYPE_PRECISION (TREE_TYPE (var)), - TYPE_SIGN (TREE_TYPE (min))), - 0, false); - max = force_fit_type (TREE_TYPE (var), - wide_int::from (max, - TYPE_PRECISION (TREE_TYPE (var)), - TYPE_SIGN (TREE_TYPE (max))), - 0, false); + min = force_fit_type (TREE_TYPE (var), wi::to_widest (min), 0, false); + max = force_fit_type (TREE_TYPE (var), wi::to_widest (max), 0, false); /* We can transform a max, min range to an anti-range or vice-versa. Use set_and_canonicalize_value_range which does @@ -3235,20 +3227,12 @@ extract_range_from_unary_expr_1 (value_range_t *vr, if (is_overflow_infinity (vr0.min)) new_min = negative_overflow_infinity (outer_type); else - new_min = force_fit_type (outer_type, - wide_int::from - (vr0.min, - TYPE_PRECISION (outer_type), - TYPE_SIGN (TREE_TYPE (vr0.min))), + new_min = force_fit_type (outer_type, wi::to_widest (vr0.min), 0, false); if (is_overflow_infinity (vr0.max)) new_max = positive_overflow_infinity (outer_type); else - new_max = force_fit_type (outer_type, - wide_int::from - (vr0.max, - TYPE_PRECISION (outer_type), - TYPE_SIGN (TREE_TYPE (vr0.max))), + new_max = force_fit_type (outer_type, wi::to_widest (vr0.max), 0, false); set_and_canonicalize_value_range (vr, vr0.type, new_min, new_max, NULL); |