[X86] Use target feature defines in tests instead of defining our own flag on the command line. NFCI

llvm-svn: 331683
This commit is contained in:
Craig Topper 2018-05-07 21:47:13 +00:00
parent 66ef4185bc
commit 45fc2c83e6
3 changed files with 10 additions and 10 deletions

View File

@ -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, __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__

View File

@ -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(__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

View File

@ -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(__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);