Pirama Arumuga Nainar | 7c91505 | 2015-04-08 08:58:29 -0700 | [diff] [blame] | 1 | // RUN: %clangxx_msan -O0 %s -c -o %t |
| 2 | // RUN: %clangxx_msan -O3 %s -c -o %t |
Evgeniy Stepanov | fa33a8c | 2013-10-14 09:53:39 +0000 | [diff] [blame] | 3 | |
| 4 | // Regression test for MemorySanitizer instrumentation of a select instruction |
| 5 | // with vector arguments. |
| 6 | |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 7 | #if defined(__x86_64__) |
Evgeniy Stepanov | fa33a8c | 2013-10-14 09:53:39 +0000 | [diff] [blame] | 8 | #include <emmintrin.h> |
| 9 | |
| 10 | __m128d select(bool b, __m128d c, __m128d d) |
| 11 | { |
| 12 | return b ? c : d; |
| 13 | } |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 14 | #elif defined (__mips64) |
| 15 | typedef double __w64d __attribute__ ((vector_size(16))); |
Evgeniy Stepanov | fa33a8c | 2013-10-14 09:53:39 +0000 | [diff] [blame] | 16 | |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 17 | __w64d select(bool b, __w64d c, __w64d d) |
| 18 | { |
| 19 | return b ? c : d; |
| 20 | } |
| 21 | #endif |