[gcc r12-3979] Fix thinko in previous alignment peeling change

Richard Biener rguenth@gcc.gnu.org
Thu Sep 30 09:24:12 GMT 2021


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

commit r12-3979-gc2dc29c4a54b8d80c4fbd753d65b75f4313ffec3
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Sep 30 10:21:36 2021 +0200

    Fix thinko in previous alignment peeling change
    
    I was mistaken in that npeel is -1 for variable peeling - it is 0.
    
    2021-09-30  Richard Biener  <rguenther@suse.de>
    
            * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
            Fix npeel check for variable amount of peeling.

Diff:
---
 gcc/tree-vect-data-refs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 1c6fc4a8f0f..bece58df3bf 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1265,7 +1265,7 @@ vect_update_misalignment_for_peel (dr_vec_info *dr_info,
   tree vectype = STMT_VINFO_VECTYPE (dr_info->stmt);
   if (DR_TARGET_ALIGNMENT (dr_info).is_constant (&alignment)
       && known_alignment_for_access_p (dr_info, vectype)
-      && npeel != -1)
+      && npeel != 0)
     {
       int misal = dr_info->misalignment;
       misal += npeel * TREE_INT_CST_LOW (DR_STEP (dr_info->dr));


More information about the Gcc-cvs mailing list