summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/avx-builtins.c
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-07-20 10:18:01 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-07-20 10:18:01 +0000
commite3b9ee0645a62b0be69c31f8a45cfd2195545998 (patch)
treedd1f590f87c6eefaba0c436c14f71b1697138156 /clang/test/CodeGen/avx-builtins.c
parentf345d40ae2a94a00cdb881934f6dae78e0dd0786 (diff)
downloadbcm5719-llvm-e3b9ee0645a62b0be69c31f8a45cfd2195545998.tar.gz
bcm5719-llvm-e3b9ee0645a62b0be69c31f8a45cfd2195545998.zip
[X86][SSE] Reimplement SSE fp2si conversion intrinsics instead of using generic IR
D20859 and D20860 attempted to replace the SSE (V)CVTTPS2DQ and VCVTTPD2DQ truncating conversions with generic IR instead. It turns out that the behaviour of these intrinsics is different enough from generic IR that this will cause problems, INF/NAN/out of range values are guaranteed to result in a 0x80000000 value - which plays havoc with constant folding which converts them to either zero or UNDEF. This is also an issue with the scalar implementations (which were already generic IR and what I was trying to match). This patch changes both scalar and packed versions back to using x86-specific builtins. It also deals with the other scalar conversion cases that are runtime rounding mode dependent and can have similar issues with constant folding. Differential Revision: https://reviews.llvm.org/D22105 llvm-svn: 276102
Diffstat (limited to 'clang/test/CodeGen/avx-builtins.c')
-rw-r--r--clang/test/CodeGen/avx-builtins.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGen/avx-builtins.c b/clang/test/CodeGen/avx-builtins.c
index bf3e8cc5db6..650e4d280ec 100644
--- a/clang/test/CodeGen/avx-builtins.c
+++ b/clang/test/CodeGen/avx-builtins.c
@@ -286,13 +286,13 @@ __m256d test_mm256_cvtps_pd(__m128 A) {
__m128i test_mm256_cvttpd_epi32(__m256d A) {
// CHECK-LABEL: test_mm256_cvttpd_epi32
- // CHECK: fptosi <4 x double> %{{.*}} to <4 x i32>
+ // CHECK: call <4 x i32> @llvm.x86.avx.cvtt.pd2dq.256(<4 x double> %{{.*}})
return _mm256_cvttpd_epi32(A);
}
__m256i test_mm256_cvttps_epi32(__m256 A) {
// CHECK-LABEL: test_mm256_cvttps_epi32
- // CHECK: fptosi <8 x float> %{{.*}} to <8 x i32>
+ // CHECK: call <8 x i32> @llvm.x86.avx.cvtt.ps2dq.256(<8 x float> %{{.*}})
return _mm256_cvttps_epi32(A);
}
OpenPOWER on IntegriCloud