From: Eric Botcazou Date: Thu, 28 May 2020 17:29:42 +0000 (+0200) Subject: Fix off-by-one error in previous commit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2815558a2dbd0ee73de4bf01abb36d609026da6e;p=gcc.git 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. --- diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index 400a0010c34..3ab614148a7 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;