diff options
author | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2022-01-11 15:52:59 +0000 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2022-01-12 14:44:25 +0000 |
commit | 016bd7523131b645bca5b5530c81ab5149922743 (patch) | |
tree | 24ae433f995d5fea8fec9f0f0ebb619ad0314226 /gcc | |
parent | c0e355c77972d96fcec2ff7da047ad03e10e51d9 (diff) | |
download | gcc-016bd7523131b645bca5b5530c81ab5149922743.zip gcc-016bd7523131b645bca5b5530c81ab5149922743.tar.gz gcc-016bd7523131b645bca5b5530c81ab5149922743.tar.bz2 |
[vect] PR103971, PR103977: Fix epilogue mode selection for autodetect only
gcc/ChangeLog:
* tree-vect-loop.c (vect-analyze-loop): Handle scenario where target
does not add autovectorize_vector_modes.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-vect-loop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 6ed2b5f..ba67de4 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3023,7 +3023,9 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared) array may contain length-agnostic and length-specific modes. Their ordering is not guaranteed, so we could end up picking a mode for the main loop that is after the epilogue's optimal mode. */ - mode_i = 1; + vector_modes[0] = autodetected_vector_mode; + mode_i = 0; + bool supports_partial_vectors = partial_vectors_supported_p (); poly_uint64 first_vinfo_vf = LOOP_VINFO_VECT_FACTOR (first_loop_vinfo); |