diff --git a/src/OpenColorIO/CPUInfo.cpp b/src/OpenColorIO/CPUInfo.cpp index 28fcd9477e..c0d7c02899 100644 --- a/src/OpenColorIO/CPUInfo.cpp +++ b/src/OpenColorIO/CPUInfo.cpp @@ -107,10 +107,10 @@ CPUInfo::CPUInfo() flags |= X86_CPU_FLAG_SSE42; /* Check OSXSAVE and AVX bits */ - if (info.reg.ecx & 0x18000000) + if ((info.reg.ecx & 0x18000000) == 0x18000000) { xcr = xgetbv(); - if(xcr & 0x6) { + if((xcr & 0x6) == 0x6) { flags |= X86_CPU_FLAG_AVX; if(info.reg.ecx & 0x20000000) { @@ -129,7 +129,7 @@ CPUInfo::CPUInfo() /* OPMASK/ZMM state */ if ((xcr & 0xe0) == 0xe0) { - if ((flags & X86_CPU_FLAG_AVX2) && (info.reg.ebx & 0xd0030000)) + if ((flags & X86_CPU_FLAG_AVX2) && ((info.reg.ebx & 0xd0030000) == 0xd0030000)) flags |= X86_CPU_FLAG_AVX512; } }