summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/sse41-builtins.c
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2015-09-19 15:12:38 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2015-09-19 15:12:38 +0000
commit12919f7e493553a6f0ddf839c0266b2c583c6507 (patch)
tree04aecc6fec0aff15da5c1a2a9da31aa79a46ae96 /clang/test/CodeGen/sse41-builtins.c
parentd0448ee59fd5794d8494b5c89b06542a419aa2c2 (diff)
downloadbcm5719-llvm-12919f7e493553a6f0ddf839c0266b2c583c6507.tar.gz
bcm5719-llvm-12919f7e493553a6f0ddf839c0266b2c583c6507.zip
[X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR
128-bit vector integer sign extensions correctly lower to the pmovsx instructions even for debug builds. This patch removes the builtins and reimplements the _mm_cvtepi*_epi* intrinsics __using builtin_shufflevector (to extract the bottom most subvector) and __builtin_convertvector (to actually perform the sign extension). Differential Revision: http://reviews.llvm.org/D12835 llvm-svn: 248092
Diffstat (limited to 'clang/test/CodeGen/sse41-builtins.c')
-rw-r--r--clang/test/CodeGen/sse41-builtins.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CodeGen/sse41-builtins.c b/clang/test/CodeGen/sse41-builtins.c
index fcb205244ae..b3ba22d3c80 100644
--- a/clang/test/CodeGen/sse41-builtins.c
+++ b/clang/test/CodeGen/sse41-builtins.c
@@ -86,42 +86,42 @@ __m128i test_mm_cmpeq_epi64(__m128i A, __m128i B) {
__m128i test_mm_cvtepi8_epi16(__m128i a) {
// CHECK-LABEL: test_mm_cvtepi8_epi16
- // CHECK: call <8 x i16> @llvm.x86.sse41.pmovsxbw(<16 x i8> {{.*}})
+ // CHECK: sext <8 x i8> {{.*}} to <8 x i16>
// CHECK-ASM: pmovsxbw %xmm{{.*}}, %xmm{{.*}}
return _mm_cvtepi8_epi16(a);
}
__m128i test_mm_cvtepi8_epi32(__m128i a) {
// CHECK-LABEL: test_mm_cvtepi8_epi32
- // CHECK: call <4 x i32> @llvm.x86.sse41.pmovsxbd(<16 x i8> {{.*}})
+ // CHECK: sext <4 x i8> {{.*}} to <4 x i32>
// CHECK-ASM: pmovsxbd %xmm{{.*}}, %xmm{{.*}}
return _mm_cvtepi8_epi32(a);
}
__m128i test_mm_cvtepi8_epi64(__m128i a) {
// CHECK-LABEL: test_mm_cvtepi8_epi64
- // CHECK: call <2 x i64> @llvm.x86.sse41.pmovsxbq(<16 x i8> {{.*}})
+ // CHECK: sext <2 x i8> {{.*}} to <2 x i64>
// CHECK-ASM: pmovsxbq %xmm{{.*}}, %xmm{{.*}}
return _mm_cvtepi8_epi64(a);
}
__m128i test_mm_cvtepi16_epi32(__m128i a) {
// CHECK-LABEL: test_mm_cvtepi16_epi32
- // CHECK: call <4 x i32> @llvm.x86.sse41.pmovsxwd(<8 x i16> {{.*}})
+ // CHECK: sext <4 x i16> {{.*}} to <4 x i32>
// CHECK-ASM: pmovsxwd %xmm{{.*}}, %xmm{{.*}}
return _mm_cvtepi16_epi32(a);
}
__m128i test_mm_cvtepi16_epi64(__m128i a) {
// CHECK-LABEL: test_mm_cvtepi16_epi64
- // CHECK: call <2 x i64> @llvm.x86.sse41.pmovsxwq(<8 x i16> {{.*}})
+ // CHECK: sext <2 x i16> {{.*}} to <2 x i64>
// CHECK-ASM: pmovsxwq %xmm{{.*}}, %xmm{{.*}}
return _mm_cvtepi16_epi64(a);
}
__m128i test_mm_cvtepi32_epi64(__m128i a) {
// CHECK-LABEL: test_mm_cvtepi32_epi64
- // CHECK: call <2 x i64> @llvm.x86.sse41.pmovsxdq(<4 x i32> {{.*}})
+ // CHECK: sext <2 x i32> {{.*}} to <2 x i64>
// CHECK-ASM: pmovsxdq %xmm{{.*}}, %xmm{{.*}}
return _mm_cvtepi32_epi64(a);
}
OpenPOWER on IntegriCloud