From 1257aad1073e1fb8989acdf7ca832fba82d10534 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 18 Oct 2021 15:02:49 +0200 Subject: Apply TLC to vect_supportable_dr_alignment This fixes handling of the return value of vect_supportable_dr_alignment in multiple places. We should use the enum type and not int for storage and not auto-convert the enum return value to bool. It also commonizes the read/write path in vect_supportable_dr_alignment. 2021-10-18 Richard Biener * tree-vect-data-refs.c (vect_peeling_hash_insert): Do not auto-convert dr_alignment_support to bool. (vect_peeling_supportable): Likewise. (vect_enhance_data_refs_alignment): Likewise. (vect_supportable_dr_alignment): Commonize read/write case. * tree-vect-stmts.c (vect_get_store_cost): Use dr_alignment_support, not int, for the vect_supportable_dr_alignment result. (vect_get_load_cost): Likewise. --- gcc/tree-vect-stmts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree-vect-stmts.c') diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 07123a2..eaf3f0a 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1027,7 +1027,7 @@ vect_get_store_cost (vec_info *vinfo, stmt_vec_info stmt_info, int ncopies, { dr_vec_info *dr_info = STMT_VINFO_DR_INFO (stmt_info); tree vectype = STMT_VINFO_VECTYPE (stmt_info); - int alignment_support_scheme + dr_alignment_support alignment_support_scheme = vect_supportable_dr_alignment (vinfo, dr_info, vectype, false); switch (alignment_support_scheme) @@ -1218,7 +1218,7 @@ vect_get_load_cost (vec_info *vinfo, stmt_vec_info stmt_info, int ncopies, { dr_vec_info *dr_info = STMT_VINFO_DR_INFO (stmt_info); tree vectype = STMT_VINFO_VECTYPE (stmt_info); - int alignment_support_scheme + dr_alignment_support alignment_support_scheme = vect_supportable_dr_alignment (vinfo, dr_info, vectype, false); switch (alignment_support_scheme) -- cgit v1.1