diff options
author | Aldy Hernandez <aldyh@gcc.gnu.org> | 2018-04-16 17:23:40 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2018-04-16 17:23:40 +0000 |
commit | 15c5f3f502ed01d2ba361e466a520b252979a75f (patch) | |
tree | be46d83cec34be5c87f7b92a53a10b67f380eb07 | |
parent | 62a2e85772c4aa3be4cf27073f39ce533ba34c6f (diff) | |
download | gcc-15c5f3f502ed01d2ba361e466a520b252979a75f.zip gcc-15c5f3f502ed01d2ba361e466a520b252979a75f.tar.gz gcc-15c5f3f502ed01d2ba361e466a520b252979a75f.tar.bz2 |
One last tweak before we move onto the new world/branch.devel/range-gen3
From-SVN: r259404
-rw-r--r-- | gcc/gimple-ssa-warn-restrict.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c index 8147972..e6466f3 100644 --- a/gcc/gimple-ssa-warn-restrict.c +++ b/gcc/gimple-ssa-warn-restrict.c @@ -308,11 +308,17 @@ builtin_memref::extend_offset_range (tree offset) if (TREE_CODE (offset) == SSA_NAME) { wide_int min, max; - if (get_range_info (offset, &min, &max)) + value_range_type rng = get_range_info_as_value_range (offset, &min, &max); + if (rng == VR_RANGE) { offrange[0] += offset_int::from (min, SIGNED); offrange[1] += offset_int::from (max, SIGNED); } + else if (rng == VR_ANTI_RANGE) + { + offrange[0] += offset_int::from (max + 1, SIGNED); + offrange[1] += offset_int::from (min - 1, SIGNED); + } else { gimple *stmt = SSA_NAME_DEF_STMT (offset); |