"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/CodeGen/avx-builtins.c" between
cfe-8.0.1.src.tar.xz and cfe-9.0.0.src.tar.xz

About: Clang is an LLVM front end for the C, C++, and Objective-C languages. Clang aims to provide a better user experience through expressive diagnostics, a high level of conformance to language standards, fast compilation, and low memory use.

avx-builtins.c  (cfe-8.0.1.src.tar.xz):avx-builtins.c  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
// RUN: %clang_cc1 -fms-extensions -fms-compatibility -ffreestanding %s -triple= x86_64-windows-msvc -target-feature +avx -emit-llvm -o - -Wall -Werror | FileChe ck %s
#include <immintrin.h> #include <immintrin.h>
// NOTE: This should match the tests in llvm/test/CodeGen/X86/sse-intrinsics-fas t-isel.ll // NOTE: This should match the tests in llvm/test/CodeGen/X86/sse-intrinsics-fas t-isel.ll
__m256d test_mm256_add_pd(__m256d A, __m256d B) { __m256d test_mm256_add_pd(__m256d A, __m256d B) {
// CHECK-LABEL: test_mm256_add_pd // CHECK-LABEL: test_mm256_add_pd
// CHECK: fadd <4 x double> // CHECK: fadd <4 x double>
return _mm256_add_pd(A, B); return _mm256_add_pd(A, B);
} }
skipping to change at line 1080 skipping to change at line 1081
// CHECK: zext i16 %{{.*}} to i32 // CHECK: zext i16 %{{.*}} to i32
return _mm256_extract_epi16(A, 15); return _mm256_extract_epi16(A, 15);
} }
int test_mm256_extract_epi32(__m256i A) { int test_mm256_extract_epi32(__m256i A) {
// CHECK-LABEL: test_mm256_extract_epi32 // CHECK-LABEL: test_mm256_extract_epi32
// CHECK: extractelement <8 x i32> %{{.*}}, {{i32|i64}} 7 // CHECK: extractelement <8 x i32> %{{.*}}, {{i32|i64}} 7
return _mm256_extract_epi32(A, 7); return _mm256_extract_epi32(A, 7);
} }
#if __x86_64__
long long test_mm256_extract_epi64(__m256i A) { long long test_mm256_extract_epi64(__m256i A) {
// CHECK-LABEL: test_mm256_extract_epi64 // CHECK-LABEL: test_mm256_extract_epi64
// CHECK: extractelement <4 x i64> %{{.*}}, {{i32|i64}} 3 // CHECK: extractelement <4 x i64> %{{.*}}, {{i32|i64}} 3
return _mm256_extract_epi64(A, 3); return _mm256_extract_epi64(A, 3);
} }
#endif
__m128d test_mm256_extractf128_pd(__m256d A) { __m128d test_mm256_extractf128_pd(__m256d A) {
// CHECK-LABEL: test_mm256_extractf128_pd // CHECK-LABEL: test_mm256_extractf128_pd
// CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i 32 2, i32 3> // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i 32 2, i32 3>
return _mm256_extractf128_pd(A, 1); return _mm256_extractf128_pd(A, 1);
} }
__m128 test_mm256_extractf128_ps(__m256 A) { __m128 test_mm256_extractf128_ps(__m256 A) {
// CHECK-LABEL: test_mm256_extractf128_ps // CHECK-LABEL: test_mm256_extractf128_ps
// CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7> // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
skipping to change at line 1158 skipping to change at line 1161
// CHECK: insertelement <16 x i16> %{{.*}}, i16 %{{.*}}, {{i32|i64}} 4 // CHECK: insertelement <16 x i16> %{{.*}}, i16 %{{.*}}, {{i32|i64}} 4
return _mm256_insert_epi16(x, b, 4); return _mm256_insert_epi16(x, b, 4);
} }
__m256i test_mm256_insert_epi32(__m256i x, int b) { __m256i test_mm256_insert_epi32(__m256i x, int b) {
// CHECK-LABEL: test_mm256_insert_epi32 // CHECK-LABEL: test_mm256_insert_epi32
// CHECK: insertelement <8 x i32> %{{.*}}, i32 %{{.*}}, {{i32|i64}} 5 // CHECK: insertelement <8 x i32> %{{.*}}, i32 %{{.*}}, {{i32|i64}} 5
return _mm256_insert_epi32(x, b, 5); return _mm256_insert_epi32(x, b, 5);
} }
#if __x86_64__
__m256i test_mm256_insert_epi64(__m256i x, long long b) { __m256i test_mm256_insert_epi64(__m256i x, long long b) {
// CHECK-LABEL: test_mm256_insert_epi64 // CHECK-LABEL: test_mm256_insert_epi64
// CHECK: insertelement <4 x i64> %{{.*}}, i64 %{{.*}}, {{i32|i64}} 2 // CHECK: insertelement <4 x i64> %{{.*}}, i64 %{{.*}}, {{i32|i64}} 2
return _mm256_insert_epi64(x, b, 2); return _mm256_insert_epi64(x, b, 2);
} }
#endif
__m256d test_mm256_insertf128_pd(__m256d A, __m128d B) { __m256d test_mm256_insertf128_pd(__m256d A, __m128d B) {
// CHECK-LABEL: test_mm256_insertf128_pd // CHECK-LABEL: test_mm256_insertf128_pd
// CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> undef, <4 x i32> <i 32 0, i32 1, i32 2, i32 3> // CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> undef, <4 x i32> <i 32 0, i32 1, i32 2, i32 3>
// CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <4 x i32> <i32 4, i32 5, i32 2, i32 3> // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
return _mm256_insertf128_pd(A, B, 0); return _mm256_insertf128_pd(A, B, 0);
} }
__m256 test_mm256_insertf128_ps(__m256 A, __m128 B) { __m256 test_mm256_insertf128_ps(__m256 A, __m128 B) {
// CHECK-LABEL: test_mm256_insertf128_ps // CHECK-LABEL: test_mm256_insertf128_ps
 End of changes. 5 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)