diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2020-05-28 19:29:42 +0200 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:09:15 -0300 |
commit | e4a1f22c3b3acb1a8e44d19d8a31b2861eefce4b (patch) | |
tree | c07df954b8650d82d7276c61881df78b3737f7c2 /gcc | |
parent | 76736ff65b3e2d40690aa994610c3dda28356fb3 (diff) | |
download | gcc-e4a1f22c3b3acb1a8e44d19d8a31b2861eefce4b.zip gcc-e4a1f22c3b3acb1a8e44d19d8a31b2861eefce4b.tar.gz gcc-e4a1f22c3b3acb1a8e44d19d8a31b2861eefce4b.tar.bz2 |
Fix off-by-one error in previous commit
The bitregion_end field points to the next bit after the region.
gcc/ChangeLog
* gimple-ssa-store-merging.c (merged_store_group::can_be_merged_into):
Fix off-by-one error.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-ssa-store-merging.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index 400a001..3ab6141 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -1874,7 +1874,7 @@ merged_store_group::can_be_merged_into (store_immediate_info *info) || stores[0]->rhs_code == BIT_INSERT_EXPR) && info->bitregion_start == stores[0]->bitregion_start && info->bitregion_end == stores[0]->bitregion_end - && info->bitregion_end - info->bitregion_start < MAX_FIXED_MODE_SIZE) + && info->bitregion_end - info->bitregion_start <= MAX_FIXED_MODE_SIZE) return true; if (stores[0]->rhs_code == MEM_REF @@ -1882,7 +1882,7 @@ merged_store_group::can_be_merged_into (store_immediate_info *info) || info->rhs_code == BIT_INSERT_EXPR) && info->bitregion_start == stores[0]->bitregion_start && info->bitregion_end == stores[0]->bitregion_end - && info->bitregion_end - info->bitregion_start < MAX_FIXED_MODE_SIZE) + && info->bitregion_end - info->bitregion_start <= MAX_FIXED_MODE_SIZE) return true; return false; |