From 4ab76933d107db95323b83e33d89bced11fa7e09 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 29 Sep 2016 20:55:26 +0200 Subject: [PATCH] adx-check.h (main): Simplify feature bit tests. * gcc.target/i386/adx-check.h (main): Simplify feature bit tests. * gcc.target/i386/avx2-check.h (main): Ditto. * gcc.target/i386/avx512bw-check.h (main): Ditto. * gcc.target/i386/avx512cd-check.h (main): Ditto. * gcc.target/i386/avx512dq-check.h (main): Ditto. * gcc.target/i386/avx512er-check.h (main): Ditto. * gcc.target/i386/avx512f-check.h (main): Ditto. * gcc.target/i386/avx512ifma-check.h (main): Ditto. * gcc.target/i386/avx512vbmi-check.h (main): Ditto. * gcc.target/i386/avx512vl-check.h (main): Ditto. From-SVN: r240631 --- gcc/testsuite/ChangeLog | 13 +++++++++++++ gcc/testsuite/gcc.target/i386/adx-check.h | 2 +- gcc/testsuite/gcc.target/i386/avx2-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512bw-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512cd-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512dq-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512er-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512f-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512ifma-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512vbmi-check.h | 4 ++-- gcc/testsuite/gcc.target/i386/avx512vl-check.h | 6 ++---- 11 files changed, 32 insertions(+), 21 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index af688477248..753b45b2a0f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2016-09-29 Uros Bizjak + + * gcc.target/i386/adx-check.h (main): Simplify feature bit tests. + * gcc.target/i386/avx2-check.h (main): Ditto. + * gcc.target/i386/avx512bw-check.h (main): Ditto. + * gcc.target/i386/avx512cd-check.h (main): Ditto. + * gcc.target/i386/avx512dq-check.h (main): Ditto. + * gcc.target/i386/avx512er-check.h (main): Ditto. + * gcc.target/i386/avx512f-check.h (main): Ditto. + * gcc.target/i386/avx512ifma-check.h (main): Ditto. + * gcc.target/i386/avx512vbmi-check.h (main): Ditto. + * gcc.target/i386/avx512vl-check.h (main): Ditto. + 2016-09-29 Uros Bizjak PR target/77756 diff --git a/gcc/testsuite/gcc.target/i386/adx-check.h b/gcc/testsuite/gcc.target/i386/adx-check.h index 580cb49ed43..5e7ad965251 100644 --- a/gcc/testsuite/gcc.target/i386/adx-check.h +++ b/gcc/testsuite/gcc.target/i386/adx-check.h @@ -23,7 +23,7 @@ main () __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((ebx & bit_ADX) == bit_ADX) + if (ebx & bit_ADX) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx2-check.h b/gcc/testsuite/gcc.target/i386/avx2-check.h index 424335dbb5e..021e1e6b8e8 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-check.h +++ b/gcc/testsuite/gcc.target/i386/avx2-check.h @@ -19,14 +19,14 @@ main () return 0; /* Run AVX2 test only if host has AVX2 support. */ - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx_os_support ()) && ((ebx & bit_AVX2) == bit_AVX2)) + if ((ebx & bit_AVX2) && avx_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-check.h b/gcc/testsuite/gcc.target/i386/avx512bw-check.h index 4cae3092fe7..d5288aaabd4 100644 --- a/gcc/testsuite/gcc.target/i386/avx512bw-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512bw-check.h @@ -19,14 +19,14 @@ main () return 0; /* Run AVX512BW test only if host has AVX512BW support. */ - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ebx & bit_AVX512BW) == bit_AVX512BW)) + if ((ebx & bit_AVX512BW) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-check.h b/gcc/testsuite/gcc.target/i386/avx512cd-check.h index bccf8b48e06..fd0b9eb05d6 100644 --- a/gcc/testsuite/gcc.target/i386/avx512cd-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512cd-check.h @@ -18,14 +18,14 @@ main () if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) return 0; - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ebx & (bit_AVX512CD)) == (bit_AVX512CD))) + if ((ebx & bit_AVX512CD) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-check.h b/gcc/testsuite/gcc.target/i386/avx512dq-check.h index e8dcf4b7d9f..7955f48e912 100644 --- a/gcc/testsuite/gcc.target/i386/avx512dq-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512dq-check.h @@ -19,14 +19,14 @@ main () return 0; /* Run AVX512DQ test only if host has AVX512DQ support. */ - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ebx & bit_AVX512DQ) == bit_AVX512DQ)) + if ((ebx & bit_AVX512DQ) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512er-check.h b/gcc/testsuite/gcc.target/i386/avx512er-check.h index 34440d346b2..06fc18a098b 100644 --- a/gcc/testsuite/gcc.target/i386/avx512er-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512er-check.h @@ -18,14 +18,14 @@ main () if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) return 0; - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ebx & bit_AVX512ER) == bit_AVX512ER)) + if ((ebx & bit_AVX512ER) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512f-check.h b/gcc/testsuite/gcc.target/i386/avx512f-check.h index 9e01367205c..811184b2fd7 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512f-check.h @@ -19,14 +19,14 @@ main () return 0; /* Run AVX512F test only if host has AVX512F support. */ - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ebx & bit_AVX512F) == bit_AVX512F)) + if ((ebx & bit_AVX512F) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512ifma-check.h b/gcc/testsuite/gcc.target/i386/avx512ifma-check.h index 9c17a549ce7..b90a4d55103 100644 --- a/gcc/testsuite/gcc.target/i386/avx512ifma-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512ifma-check.h @@ -18,14 +18,14 @@ main () if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) return 0; - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ebx & bit_AVX512IFMA) == bit_AVX512IFMA)) + if ((ebx & bit_AVX512IFMA) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h b/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h index 97aca277224..2c1f6259401 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512vbmi-check.h @@ -18,14 +18,14 @@ main () if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) return 0; - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) && ((ecx & bit_AVX512VBMI) == bit_AVX512VBMI)) + if ((ecx & bit_AVX512VBMI) && avx512f_os_support ()) { do_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-check.h b/gcc/testsuite/gcc.target/i386/avx512vl-check.h index c017ee28e47..29d984d03dd 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vl-check.h +++ b/gcc/testsuite/gcc.target/i386/avx512vl-check.h @@ -19,16 +19,14 @@ main () return 0; /* Run avx512vl test only if host has avx512vl support. */ - if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE)) + if (ecx & bit_OSXSAVE) { if (__get_cpuid_max (0, NULL) < 7) return 0; __cpuid_count (7, 0, eax, ebx, ecx, edx); - if ((avx512f_os_support ()) - && ((ebx & bit_AVX512F) == bit_AVX512F) - && ((ebx & bit_AVX512VL) == bit_AVX512VL)) + if ((ebx & bit_AVX512VL) && avx512f_os_support ()) { do_test (); #ifdef DEBUG -- 2.30.2