public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] Fix off-by-one error in previous commit
@ 2020-08-22 21:41 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 21:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e4a1f22c3b3acb1a8e44d19d8a31b2861eefce4b

commit e4a1f22c3b3acb1a8e44d19d8a31b2861eefce4b
Author: Eric Botcazou <ebotcazou@gcc.gnu.org>
Date:   Thu May 28 19:29:42 2020 +0200

    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:
---
 gcc/gimple-ssa-store-merging.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-22 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 21:41 [gcc/devel/autopar_devel] Fix off-by-one error in previous commit Giuliano Belinassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).