* 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
+2016-09-29 Uros Bizjak <ubizjak@gmail.com>
+
+ * 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 <ubizjak@gmail.com>
PR target/77756
__cpuid_count (7, 0, eax, ebx, ecx, edx);
- if ((ebx & bit_ADX) == bit_ADX)
+ if (ebx & bit_ADX)
{
do_test ();
#ifdef DEBUG
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
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
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
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
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
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
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
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
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