diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-05-23 22:13:02 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-05-23 22:13:02 +0000 |
commit | 90770c7c76574b72c5807c5af87bfc6bec7078d4 (patch) | |
tree | 12fdc931d2696a1ca603047445e916f5e088be1a /clang/test/CodeGen/avx-builtins.c | |
parent | adcaef72382e367dcc6a12ab3980baa60b162489 (diff) | |
download | bcm5719-llvm-90770c7c76574b72c5807c5af87bfc6bec7078d4.tar.gz bcm5719-llvm-90770c7c76574b72c5807c5af87bfc6bec7078d4.zip |
[X86][SSE] Replace lossless i32/f32 to f64 conversion intrinsics with generic IR
Both the (V)CVTDQ2PD(Y) (i32 to f64) and (V)CVTPS2PD(Y) (f32 to f64) conversion instructions are lossless and can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics without affecting final codegen.
This patch removes the clang builtins and their use in the sse2/avx headers - a future patch will deal with removing the llvm intrinsics, but that will require a bit more work.
Differential Revision: http://reviews.llvm.org/D20528
llvm-svn: 270499
Diffstat (limited to 'clang/test/CodeGen/avx-builtins.c')
-rw-r--r-- | clang/test/CodeGen/avx-builtins.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGen/avx-builtins.c b/clang/test/CodeGen/avx-builtins.c index ad187e805ca..9558421191f 100644 --- a/clang/test/CodeGen/avx-builtins.c +++ b/clang/test/CodeGen/avx-builtins.c @@ -250,7 +250,7 @@ __m128 test_mm_cmp_ss(__m128 A, __m128 B) { __m256d test_mm256_cvtepi32_pd(__m128i A) { // CHECK-LABEL: test_mm256_cvtepi32_pd - // CHECK: call <4 x double> @llvm.x86.avx.cvtdq2.pd.256(<4 x i32> %{{.*}}) + // CHECK: sitofp <4 x i32> %{{.*}} to <4 x double> return _mm256_cvtepi32_pd(A); } @@ -280,7 +280,7 @@ __m256i test_mm256_cvtps_epi32(__m256 A) { __m256d test_mm256_cvtps_pd(__m128 A) { // CHECK-LABEL: test_mm256_cvtps_pd - // CHECK: call <4 x double> @llvm.x86.avx.cvt.ps2.pd.256(<4 x float> %{{.*}}) + // CHECK: fpext <4 x float> %{{.*}} to <4 x double> return _mm256_cvtps_pd(A); } |