1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -ffreestanding %s -verify 2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -ffreestanding -fno-lax-vector-conversions %s -verify 3f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -ffreestanding -x c++ %s -verify 4f4a2713aSLionel Sambuc // expected-no-diagnostics 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc #if defined(i386) || defined(__x86_64__) 7f4a2713aSLionel Sambuc 8f4a2713aSLionel Sambuc // Pretend to enable all features. 9f4a2713aSLionel Sambuc #ifndef __3dNOW__ 10f4a2713aSLionel Sambuc #define __3dNOW__ 11f4a2713aSLionel Sambuc #endif 12f4a2713aSLionel Sambuc #ifndef __BMI__ 13f4a2713aSLionel Sambuc #define __BMI__ 14f4a2713aSLionel Sambuc #endif 15f4a2713aSLionel Sambuc #ifndef __BMI2__ 16f4a2713aSLionel Sambuc #define __BMI2__ 17f4a2713aSLionel Sambuc #endif 18f4a2713aSLionel Sambuc #ifndef __LZCNT__ 19f4a2713aSLionel Sambuc #define __LZCNT__ 20f4a2713aSLionel Sambuc #endif 21f4a2713aSLionel Sambuc #ifndef __POPCNT__ 22f4a2713aSLionel Sambuc #define __POPCNT__ 23f4a2713aSLionel Sambuc #endif 24f4a2713aSLionel Sambuc #ifndef __RDSEED__ 25f4a2713aSLionel Sambuc #define __RDSEED__ 26f4a2713aSLionel Sambuc #endif 27f4a2713aSLionel Sambuc #ifndef __PRFCHW__ 28f4a2713aSLionel Sambuc #define __PRFCHW__ 29f4a2713aSLionel Sambuc #endif 30f4a2713aSLionel Sambuc #ifndef __SSE4A__ 31f4a2713aSLionel Sambuc #define __SSE4A__ 32f4a2713aSLionel Sambuc #endif 33f4a2713aSLionel Sambuc #ifndef __FMA4__ 34f4a2713aSLionel Sambuc #define __FMA4__ 35f4a2713aSLionel Sambuc #endif 36f4a2713aSLionel Sambuc #ifndef __XOP__ 37f4a2713aSLionel Sambuc #define __XOP__ 38f4a2713aSLionel Sambuc #endif 39f4a2713aSLionel Sambuc #ifndef __F16C__ 40f4a2713aSLionel Sambuc #define __F16C__ 41f4a2713aSLionel Sambuc #endif 42f4a2713aSLionel Sambuc #ifndef __MMX__ 43f4a2713aSLionel Sambuc #define __MMX__ 44f4a2713aSLionel Sambuc #endif 45f4a2713aSLionel Sambuc #ifndef __SSE__ 46f4a2713aSLionel Sambuc #define __SSE__ 47f4a2713aSLionel Sambuc #endif 48f4a2713aSLionel Sambuc #ifndef __SSE2__ 49f4a2713aSLionel Sambuc #define __SSE2__ 50f4a2713aSLionel Sambuc #endif 51f4a2713aSLionel Sambuc #ifndef __SSE3__ 52f4a2713aSLionel Sambuc #define __SSE3__ 53f4a2713aSLionel Sambuc #endif 54f4a2713aSLionel Sambuc #ifndef __SSSE3__ 55f4a2713aSLionel Sambuc #define __SSSE3__ 56f4a2713aSLionel Sambuc #endif 57f4a2713aSLionel Sambuc #ifndef __SSE4_1__ 58f4a2713aSLionel Sambuc #define __SSE4_1__ 59f4a2713aSLionel Sambuc #endif 60f4a2713aSLionel Sambuc #ifndef __SSE4_2__ 61f4a2713aSLionel Sambuc #define __SSE4_2__ 62f4a2713aSLionel Sambuc #endif 63f4a2713aSLionel Sambuc #ifndef __AES__ 64f4a2713aSLionel Sambuc #define __AES__ 65f4a2713aSLionel Sambuc #endif 66f4a2713aSLionel Sambuc #ifndef __AVX__ 67f4a2713aSLionel Sambuc #define __AVX__ 68f4a2713aSLionel Sambuc #endif 69f4a2713aSLionel Sambuc #ifndef __AVX2__ 70f4a2713aSLionel Sambuc #define __AVX2__ 71f4a2713aSLionel Sambuc #endif 72f4a2713aSLionel Sambuc #ifndef __BMI__ 73f4a2713aSLionel Sambuc #define __BMI__ 74f4a2713aSLionel Sambuc #endif 75f4a2713aSLionel Sambuc #ifndef __BMI2__ 76f4a2713aSLionel Sambuc #define __BMI2__ 77f4a2713aSLionel Sambuc #endif 78f4a2713aSLionel Sambuc #ifndef __LZCNT__ 79f4a2713aSLionel Sambuc #define __LZCNT__ 80f4a2713aSLionel Sambuc #endif 81f4a2713aSLionel Sambuc #ifndef __FMA__ 82f4a2713aSLionel Sambuc #define __FMA__ 83f4a2713aSLionel Sambuc #endif 84f4a2713aSLionel Sambuc #ifndef __RDRND__ 85f4a2713aSLionel Sambuc #define __RDRND__ 86f4a2713aSLionel Sambuc #endif 87*0a6a1f1dSLionel Sambuc #ifndef __SHA__ 88*0a6a1f1dSLionel Sambuc #define __SHA__ 89*0a6a1f1dSLionel Sambuc #endif 90*0a6a1f1dSLionel Sambuc #ifndef __ADX__ 91*0a6a1f1dSLionel Sambuc #define __ADX__ 92*0a6a1f1dSLionel Sambuc #endif 93*0a6a1f1dSLionel Sambuc #ifndef __TBM__ 94*0a6a1f1dSLionel Sambuc #define __TBM__ 95*0a6a1f1dSLionel Sambuc #endif 96*0a6a1f1dSLionel Sambuc #ifndef __RTM__ 97*0a6a1f1dSLionel Sambuc #define __RTM__ 98*0a6a1f1dSLionel Sambuc #endif 99*0a6a1f1dSLionel Sambuc #ifndef __PCLMUL__ 100*0a6a1f1dSLionel Sambuc #define __PCLMUL__ 101*0a6a1f1dSLionel Sambuc #endif 102*0a6a1f1dSLionel Sambuc #ifndef __FSGSBASE__ 103*0a6a1f1dSLionel Sambuc #define __FSGSBASE__ 104*0a6a1f1dSLionel Sambuc #endif 105*0a6a1f1dSLionel Sambuc #ifndef __AVX512F__ 106*0a6a1f1dSLionel Sambuc #define __AVX512F__ 107*0a6a1f1dSLionel Sambuc #endif 108*0a6a1f1dSLionel Sambuc #ifndef __AVX512VL__ 109*0a6a1f1dSLionel Sambuc #define __AVX512VL__ 110*0a6a1f1dSLionel Sambuc #endif 111*0a6a1f1dSLionel Sambuc #ifndef __AVX512BW__ 112*0a6a1f1dSLionel Sambuc #define __AVX512BW__ 113*0a6a1f1dSLionel Sambuc #endif 114*0a6a1f1dSLionel Sambuc #ifndef __AVX512ER__ 115*0a6a1f1dSLionel Sambuc #define __AVX512ER__ 116*0a6a1f1dSLionel Sambuc #endif 117*0a6a1f1dSLionel Sambuc #ifndef __AVX512PF__ 118*0a6a1f1dSLionel Sambuc #define __AVX512PF__ 119*0a6a1f1dSLionel Sambuc #endif 120*0a6a1f1dSLionel Sambuc #ifndef __AVX512DQ__ 121*0a6a1f1dSLionel Sambuc #define __AVX512DQ__ 122*0a6a1f1dSLionel Sambuc #endif 123*0a6a1f1dSLionel Sambuc #ifndef __AVX512CD__ 124*0a6a1f1dSLionel Sambuc #define __AVX512CD__ 125*0a6a1f1dSLionel Sambuc #endif 126f4a2713aSLionel Sambuc 127f4a2713aSLionel Sambuc // Now include the metaheader that includes all x86 intrinsic headers. 128f4a2713aSLionel Sambuc #include <x86intrin.h> 129f4a2713aSLionel Sambuc 130f4a2713aSLionel Sambuc #endif 131