summaryrefslogtreecommitdiff
path: root/test/msan/vector_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/msan/vector_select.cc')
-rw-r--r--test/msan/vector_select.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/msan/vector_select.cc b/test/msan/vector_select.cc
new file mode 100644
index 0000000000000..e8d55423293c4
--- /dev/null
+++ b/test/msan/vector_select.cc
@@ -0,0 +1,13 @@
+// RUN: %clangxx_msan -m64 -O0 %s -c -o %t
+// RUN: %clangxx_msan -m64 -O3 %s -c -o %t
+
+// Regression test for MemorySanitizer instrumentation of a select instruction
+// with vector arguments.
+
+#include <emmintrin.h>
+
+__m128d select(bool b, __m128d c, __m128d d)
+{
+ return b ? c : d;
+}
+