diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-10-14 15:17:05 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-10-14 15:17:05 +0000 |
| commit | 251d1e5d217dcdf6bd14e7ba1b9bb2bef4778fd9 (patch) | |
| tree | 492814a234c1b5de69e9c0cde07a3c169bbe5a7e | |
| parent | be83d8f693bf5a9c555f9db8eb9a8e74cedbc93e (diff) | |
| download | bcm5719-llvm-251d1e5d217dcdf6bd14e7ba1b9bb2bef4778fd9.tar.gz bcm5719-llvm-251d1e5d217dcdf6bd14e7ba1b9bb2bef4778fd9.zip | |
[msan] Test for r192599.
llvm-svn: 192600
| -rw-r--r-- | compiler-rt/lib/msan/lit_tests/vector_cvt.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/compiler-rt/lib/msan/lit_tests/vector_cvt.cc b/compiler-rt/lib/msan/lit_tests/vector_cvt.cc new file mode 100644 index 00000000000..c200c77de96 --- /dev/null +++ b/compiler-rt/lib/msan/lit_tests/vector_cvt.cc @@ -0,0 +1,23 @@ +// RUN: %clangxx_msan -m64 -O0 %s -o %t && %t +// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 %s -o %t && not %t 2>&1 | FileCheck %s + +#include <emmintrin.h> + +int to_int(double v) { + __m128d t = _mm_set_sd(v); + int x = _mm_cvtsd_si32(t); + return x; + // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value + // CHECK: #{{.*}} in to_int{{.*}}vector_cvt.cc:[[@LINE-4]] +} + +int main() { +#ifdef POSITIVE + double v; +#else + double v = 1.1; +#endif + double* volatile p = &v; + int x = to_int(*p); + return !x; +} |

