Author: ctopper Date: Mon May 7 14:47:13 2018 New Revision: 331683 URL: http://llvm.org/viewvc/llvm-project?rev=331683&view=rev Log: [X86] Use target feature defines in tests instead of defining our own flag on the command line. NFCI
Modified: cfe/trunk/test/CodeGen/gfni-builtins.c cfe/trunk/test/CodeGen/vaes-builtins.c cfe/trunk/test/CodeGen/vpclmulqdq-builtins.c Modified: cfe/trunk/test/CodeGen/gfni-builtins.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/gfni-builtins.c?rev=331683&r1=331682&r2=331683&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/gfni-builtins.c (original) +++ cfe/trunk/test/CodeGen/gfni-builtins.c Mon May 7 14:47:13 2018 @@ -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 <immintrin.h> @@ -22,7 +22,7 @@ __m128i test_mm_gf2p8mul_epi8(__m128i A, 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 // 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(__m12 // 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__ Modified: cfe/trunk/test/CodeGen/vaes-builtins.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/vaes-builtins.c?rev=331683&r1=331682&r2=331683&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/vaes-builtins.c (original) +++ cfe/trunk/test/CodeGen/vaes-builtins.c Mon May 7 14:47:13 2018 @@ -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 <immintrin.h> @@ -27,7 +27,7 @@ __m256i test_mm256_aesdeclast_epi128(__m 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 Modified: cfe/trunk/test/CodeGen/vpclmulqdq-builtins.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/vpclmulqdq-builtins.c?rev=331683&r1=331682&r2=331683&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/vpclmulqdq-builtins.c (original) +++ cfe/trunk/test/CodeGen/vpclmulqdq-builtins.c Mon May 7 14:47:13 2018 @@ -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 <immintrin.h> @@ -8,7 +8,7 @@ __m256i test_mm256_clmulepi64_epi128(__m 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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits