2015-03-03 03:34:27 +08:00
|
|
|
// RUN: %clangxx_msan -O0 %s -c -o %t
|
|
|
|
// RUN: %clangxx_msan -O3 %s -c -o %t
|
2013-10-14 17:53:39 +08:00
|
|
|
|
|
|
|
// Regression test for MemorySanitizer instrumentation of a select instruction
|
|
|
|
// with vector arguments.
|
|
|
|
|
2015-02-18 17:24:19 +08:00
|
|
|
#if defined(__x86_64__)
|
2013-10-14 17:53:39 +08:00
|
|
|
#include <emmintrin.h>
|
|
|
|
|
|
|
|
__m128d select(bool b, __m128d c, __m128d d)
|
|
|
|
{
|
|
|
|
return b ? c : d;
|
|
|
|
}
|
2015-07-05 16:11:36 +08:00
|
|
|
#elif defined (__mips64) || defined (__powerpc64__)
|
2015-02-18 17:24:19 +08:00
|
|
|
typedef double __w64d __attribute__ ((vector_size(16)));
|
2013-10-14 17:53:39 +08:00
|
|
|
|
2015-02-18 17:24:19 +08:00
|
|
|
__w64d select(bool b, __w64d c, __w64d d)
|
|
|
|
{
|
|
|
|
return b ? c : d;
|
|
|
|
}
|
|
|
|
#endif
|