From 45fc2c83e60265f3772ba86b9b832f3d540ef049 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 7 May 2018 21:47:13 +0000 Subject: [PATCH] [X86] Use target feature defines in tests instead of defining our own flag on the command line. NFCI llvm-svn: 331683 --- clang/test/CodeGen/gfni-builtins.c | 12 ++++++------ clang/test/CodeGen/vaes-builtins.c | 4 ++-- clang/test/CodeGen/vpclmulqdq-builtins.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clang/test/CodeGen/gfni-builtins.c b/clang/test/CodeGen/gfni-builtins.c index 95cfd4fcd5c7..0d10d7aeacd6 100644 --- a/clang/test/CodeGen/gfni-builtins.c +++ b/clang/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/clang/test/CodeGen/vaes-builtins.c b/clang/test/CodeGen/vaes-builtins.c index df160aa16ee3..1dd5784814d3 100644 --- a/clang/test/CodeGen/vaes-builtins.c +++ b/clang/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/clang/test/CodeGen/vpclmulqdq-builtins.c b/clang/test/CodeGen/vpclmulqdq-builtins.c index 8c610e2d851c..15eef399bcdf 100644 --- a/clang/test/CodeGen/vpclmulqdq-builtins.c +++ b/clang/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);