[msan] Test for r192599.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192600 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/msan/lit_tests/vector_cvt.cc b/lib/msan/lit_tests/vector_cvt.cc
new file mode 100644
index 0000000..c200c77
--- /dev/null
+++ b/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;
+}