Vector MIN narrowing tests made target-stable.
GCC vector narrowing tests for MIN operations are now target-stable across different architectures.
GCC’s testsuite has been updated to make vector MIN narrowing tests more stable across different targets. The positive MIN narrowing test is now restricted to AArch64 and x86 targets due to requirements for narrow vector MIN support and specific modes. Additionally, a shared-result test now checks the GIMPLE dump before target lowering can interfere, ensuring the count is independent of target-specific vector mode behavior. This resolves issues where tests might pass or fail incorrectly due to target-specific lowering.
In Details
Two vector narrowing tests are adjusted for stability. vec-narrow-1.C's positive MIN narrowing test, which checks for V2SI to V2DI widening via a narrow vector MIN, is now limited to AArch64 and x86. This is because 32-bit ARM and SPARC lack target support for the required narrow vector MIN modes. The vec-narrow-minmax-2.C test, checking shared MIN results, now scans the GIMPLE dump before target lowering splits vectors, making the MIN count independent of target vector mode support.
- vector narrowing
- An optimization process where operations on wide vector types are converted into operations on narrower vector types, potentially improving performance or enabling further optimizations.
- GIMPLE
- GCC's three-value intermediate representation (IR), which is a lower-level, simpler form than the user's source code or the compiler's higher-level tree representation. It is used for many optimization passes.
- target lowering
- The phase of compilation where generic intermediate representation is translated into machine-specific instructions for the target architecture.
- AArch64
- The 64-bit ARM architecture.
- x86
- A family of instruction set architectures developed by Intel and widely used in desktop and server computers.