Adjust x86 vectorization tests for cost comparison.
GCC test suite updates include duplicating vectorization tests with explicit cost comparison flags to ensure accurate behavior.
Several x86 vectorization tests have been adjusted to account for the enabled vector cost comparison feature. The changes involve duplicating test cases, with one version explicitly disabling cost comparison (--param ix86-vect-compare-costs=0) and the other enabling it (--param ix86-vect-compare-costs=1). This allows verifying the behavior of the vectorizer under both configurations, particularly for epilogue selection.
In Details
This commit modifies gcc.target/i386/vect-epilogues-2.c and gcc.target/i386/vect-pr113078.c by duplicating them into -2b.c and -pr113078b.c variants. The original versions are configured with --param ix86-vect-compare-costs=0, while the new variants use --param ix86-vect-compare-costs=1. This isolates the impact of the cost comparison model on the selection of SSE vector sizes in vector epilogues, specifically when generic tuning is enabled. The change highlights the sensitivity of the vectorizer to cost modeling and target-specific tuning parameters.
For Context
Vectorization in compilers transforms scalar operations into vector operations for performance. Vector epilogues handle remaining elements in a loop when the iteration count isn't a multiple of the vector length. GCC uses a cost model to estimate the performance of different vectorization strategies. This commit adjusts tests to explicitly enable or disable the cost comparison, ensuring the vectorizer behaves as expected with and without this feature enabled.