[compiler-rt] r192600 - [msan] Test for r192599.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Oct 14 08:17:05 PDT 2013


Author: eugenis
Date: Mon Oct 14 10:17:05 2013
New Revision: 192600

URL: http://llvm.org/viewvc/llvm-project?rev=192600&view=rev
Log:
[msan] Test for r192599.

Added:
    compiler-rt/trunk/lib/msan/lit_tests/vector_cvt.cc   (with props)

Added: compiler-rt/trunk/lib/msan/lit_tests/vector_cvt.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/lit_tests/vector_cvt.cc?rev=192600&view=auto
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/vector_cvt.cc (added)
+++ compiler-rt/trunk/lib/msan/lit_tests/vector_cvt.cc Mon Oct 14 10:17:05 2013
@@ -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;
+}

Propchange: compiler-rt/trunk/lib/msan/lit_tests/vector_cvt.cc
------------------------------------------------------------------------------
    svn:eol-style = LF





More information about the llvm-commits mailing list