diff options
author | Richard Biener <rguenther@suse.de> | 2021-10-18 15:02:49 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-10-18 16:15:19 +0200 |
commit | 1257aad1073e1fb8989acdf7ca832fba82d10534 (patch) | |
tree | 69253cd1e6c8a1f3ed8d1efc0e78755a8c1e7c25 /gcc/tree-vect-stmts.c | |
parent | 30d6ff3916882c7af80f92e0030cedb0788572d3 (diff) | |
download | gcc-1257aad1073e1fb8989acdf7ca832fba82d10534.zip gcc-1257aad1073e1fb8989acdf7ca832fba82d10534.tar.gz gcc-1257aad1073e1fb8989acdf7ca832fba82d10534.tar.bz2 |
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 <rguenther@suse.de>
* 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.
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |