Apply TLC to vect_supportable_dr_alignment
authorRichard Biener <rguenther@suse.de>
Mon, 18 Oct 2021 13:02:49 +0000 (15:02 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 18 Oct 2021 14:15:19 +0000 (16:15 +0200)
commit1257aad1073e1fb8989acdf7ca832fba82d10534
tree69253cd1e6c8a1f3ed8d1efc0e78755a8c1e7c25
parent30d6ff3916882c7af80f92e0030cedb0788572d3
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.
gcc/tree-vect-data-refs.c
gcc/tree-vect-stmts.c