aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-06-19 12:28:32 +0200
committerRichard Biener <rguenther@suse.de>2023-06-21 09:10:13 +0200
commit24c125fe47ac95f9e83f7e2bfa8594592a76368f (patch)
tree6f817e4881a088b28d4f55c057d6f8b335c93997 /gcc/tree-ssa-loop-ivopts.h
parent864c6471bdc6cdec6da60b66ac13e9fe3cd73fb8 (diff)
downloadgcc-24c125fe47ac95f9e83f7e2bfa8594592a76368f.zip
gcc-24c125fe47ac95f9e83f7e2bfa8594592a76368f.tar.gz
gcc-24c125fe47ac95f9e83f7e2bfa8594592a76368f.tar.bz2
[i386] Reject too large vectors for partial vector vectorization
The following works around the lack of the x86 backend making the vectorizer compare the costs of the different possible vector sizes the backed advertises through the vector_modes hook. When enabling masked epilogues or main loops then this means we will select the prefered vector mode which is usually the largest even for loops that do not iterate close to the times the vector has lanes. When not using masking the vectorizer would reject any mode resulting in a VF bigger than the number of iterations but with masking they are simply masked out. So this overloads the finish_cost function and matches for the problematic case, forcing a high cost to make us try a smaller vector size. * config/i386/i386.cc (ix86_vector_costs::finish_cost): Overload. For masked main loops make sure the vectorization factor isn't more than double the number of iterations. * gcc.target/i386/vect-partial-vectors-1.c: New testcase. * gcc.target/i386/vect-partial-vectors-2.c: Likewise.
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.h')
0 files changed, 0 insertions, 0 deletions