]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/msan/vector_select.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / msan / vector_select.cc
CommitLineData
92a42be0
SL
1// RUN: %clangxx_msan -O0 %s -c -o %t
2// RUN: %clangxx_msan -O3 %s -c -o %t
1a4d82fc
JJ
3
4// Regression test for MemorySanitizer instrumentation of a select instruction
5// with vector arguments.
6
92a42be0 7#if defined(__x86_64__)
1a4d82fc
JJ
8#include <emmintrin.h>
9
10__m128d select(bool b, __m128d c, __m128d d)
11{
12 return b ? c : d;
13}
92a42be0
SL
14#elif defined (__mips64) || defined (__powerpc64__)
15typedef double __w64d __attribute__ ((vector_size(16)));
1a4d82fc 16
92a42be0
SL
17__w64d select(bool b, __w64d c, __w64d d)
18{
19 return b ? c : d;
20}
21#endif