diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-08-04 06:41:03 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-08-04 07:23:41 +0200 |
commit | f21757eb8fa74ad8a6f64cd7f9137b07f4714e11 (patch) | |
tree | 2e924ea454b57fdf2851bfe284decff3dfc3e1ba /gcc/builtins.c | |
parent | 265d817b1eb4644c7a9613ad6920315d98e2e0a4 (diff) | |
download | gcc-f21757eb8fa74ad8a6f64cd7f9137b07f4714e11.zip gcc-f21757eb8fa74ad8a6f64cd7f9137b07f4714e11.tar.gz gcc-f21757eb8fa74ad8a6f64cd7f9137b07f4714e11.tar.bz2 |
Remove ad-hoc range canonicalization from determine_block_size.
Anti ranges of ~[MIN,X] are automatically canonicalized to [X+1,MAX],
at creation time. There is no need to handle them specially.
Tested by adding a gcc_unreachable and bootstrapping/testing.
gcc/ChangeLog:
* builtins.c (determine_block_size): Remove ad-hoc range canonicalization.
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 228db78..beb56e0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -3287,12 +3287,6 @@ determine_block_size (tree len, rtx len_rtx, } else if (range_type == VR_ANTI_RANGE) { - /* Anti range 0...N lets us to determine minimal size to N+1. */ - if (min == 0) - { - if (wi::fits_uhwi_p (max) && max.to_uhwi () + 1 != 0) - *min_size = max.to_uhwi () + 1; - } /* Code like int n; @@ -3302,7 +3296,7 @@ determine_block_size (tree len, rtx len_rtx, Produce anti range allowing negative values of N. We still can use the information and make a guess that N is not negative. */ - else if (!wi::leu_p (max, 1 << 30) && wi::fits_uhwi_p (min)) + if (!wi::leu_p (max, 1 << 30) && wi::fits_uhwi_p (min)) *probable_max_size = min.to_uhwi () - 1; } } |