From: Craig Topper Date: Mon, 7 May 2018 21:47:13 +0000 (+0000) Subject: [X86] Use target feature defines in tests instead of defining our own flag on the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e95b501e244912b2617d0693f71adcdad394ab93;p=clang [X86] Use target feature defines in tests instead of defining our own flag on the command line. NFCI git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331683 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/gfni-builtins.c b/test/CodeGen/gfni-builtins.c index 95cfd4fcd5..0d10d7aeac 100644 --- a/test/CodeGen/gfni-builtins.c +++ b/test/CodeGen/gfni-builtins.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +gfni -emit-llvm -o - | FileCheck %s --check-prefix SSE -// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -DAVX -target-feature +gfni -target-feature +avx -emit-llvm -o - | FileCheck %s --check-prefixes SSE,AVX -// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -DAVX512 -target-feature +gfni -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - | FileCheck %s --check-prefixes SSE,AVX,AVX512 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +gfni -target-feature +avx -emit-llvm -o - | FileCheck %s --check-prefixes SSE,AVX +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +gfni -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - | FileCheck %s --check-prefixes SSE,AVX,AVX512 #include @@ -22,7 +22,7 @@ __m128i test_mm_gf2p8mul_epi8(__m128i A, __m128i B) { return _mm_gf2p8mul_epi8(A, B); } -#if defined(AVX) || defined(AVX512) +#ifdef __AVX__ __m256i test_mm256_gf2p8affineinv_epi64_epi8(__m256i A, __m256i B) { // AVX-LABEL: @test_mm256_gf2p8affineinv_epi64_epi8 // AVX: @llvm.x86.vgf2p8affineinvqb.256 @@ -40,9 +40,9 @@ __m256i test_mm256_gf2p8mul_epi8(__m256i A, __m256i B) { // AVX: @llvm.x86.vgf2p8mulb.256 return _mm256_gf2p8mul_epi8(A, B); } -#endif // AVX +#endif // __AVX__ -#ifdef AVX512 +#ifdef __AVX512BW__ __m512i test_mm512_gf2p8affineinv_epi64_epi8(__m512i A, __m512i B) { // AVX512-LABEL: @test_mm512_gf2p8affineinv_epi64_epi8 // AVX512: @llvm.x86.vgf2p8affineinvqb.512 @@ -179,4 +179,4 @@ __m128i test_mm_mask_gf2p8mul_epi8(__m128i S, __mmask16 U, __m128i A, __m128i B) // AVX512: select <16 x i1> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}}, <16 x i8> {{.*}} return _mm_mask_gf2p8mul_epi8(S, U, A, B); } -#endif // AVX512 +#endif // __AVX512BW__ diff --git a/test/CodeGen/vaes-builtins.c b/test/CodeGen/vaes-builtins.c index df160aa16e..1dd5784814 100644 --- a/test/CodeGen/vaes-builtins.c +++ b/test/CodeGen/vaes-builtins.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +vaes -emit-llvm -o - | FileCheck %s --check-prefix AVX -// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -DAVX512 -target-feature +vaes -target-feature +avx512f -emit-llvm -o - | FileCheck %s --check-prefixes AVX,AVX512 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +vaes -target-feature +avx512f -emit-llvm -o - | FileCheck %s --check-prefixes AVX,AVX512 #include @@ -27,7 +27,7 @@ __m256i test_mm256_aesdeclast_epi128(__m256i __A, __m256i __B) { return _mm256_aesdeclast_epi128(__A, __B); } -#ifdef AVX512 +#ifdef __AVX512F__ __m512i test_mm512_aesenc_epi128(__m512i __A, __m512i __B) { // AVX512-LABEL: @test_mm512_aesenc_epi128 // AVX512: @llvm.x86.aesni.aesenc.512 diff --git a/test/CodeGen/vpclmulqdq-builtins.c b/test/CodeGen/vpclmulqdq-builtins.c index 8c610e2d85..15eef399bc 100644 --- a/test/CodeGen/vpclmulqdq-builtins.c +++ b/test/CodeGen/vpclmulqdq-builtins.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +vpclmulqdq -emit-llvm -o - | FileCheck %s --check-prefix AVX -// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -DAVX512 -target-feature +vpclmulqdq -target-feature +avx512f -emit-llvm -o - | FileCheck %s --check-prefixes AVX,AVX512 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +vpclmulqdq -target-feature +avx512f -emit-llvm -o - | FileCheck %s --check-prefixes AVX,AVX512 #include @@ -8,7 +8,7 @@ __m256i test_mm256_clmulepi64_epi128(__m256i A, __m256i B) { return _mm256_clmulepi64_epi128(A, B, 0); } -#ifdef AVX512 +#ifdef __AVX512F__ __m512i test_mm512_clmulepi64_epi128(__m512i A, __m512i B) { // AVX512: @llvm.x86.pclmulqdq.512 return _mm512_clmulepi64_epi128(A, B, 0);