diff options
author | Richard Biener <rguenther@suse.de> | 2021-01-05 14:23:55 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-01-05 15:54:42 +0100 |
commit | 01da03c915f086fb9aa36b809c1a06a9f661533b (patch) | |
tree | 44061e426db18709683d913e9f0676fa9771a53b /gcc/tree.c | |
parent | 1ff0ddcd8b4728bcc96e1daf2e70a03dc9fbf171 (diff) | |
download | gcc-01da03c915f086fb9aa36b809c1a06a9f661533b.zip gcc-01da03c915f086fb9aa36b809c1a06a9f661533b.tar.gz gcc-01da03c915f086fb9aa36b809c1a06a9f661533b.tar.bz2 |
tree-optimization/98381 - fix live bool vector extract
This fixes extraction of live bool vector results for the case of
integer mode vectors.
2021-01-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/98381
* tree.c (vector_element_bits): Properly compute bool vector
element size.
* tree-vect-loop.c (vectorizable_live_operation): Properly
compute the last lane bit offset.
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -14021,8 +14021,13 @@ vector_element_bits (const_tree type) { gcc_checking_assert (VECTOR_TYPE_P (type)); if (VECTOR_BOOLEAN_TYPE_P (type)) - return vector_element_size (tree_to_poly_uint64 (TYPE_SIZE (type)), - TYPE_VECTOR_SUBPARTS (type)); + { + if (VECTOR_MODE_P (TYPE_MODE (type))) + return vector_element_size (tree_to_poly_uint64 (TYPE_SIZE (type)), + TYPE_VECTOR_SUBPARTS (type)); + else + return 1; + } return tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type))); } |