]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/msan/vector_div.cc
Vendor import of compiler-rt trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / msan / vector_div.cc
1 // Regression test for https://bugs.llvm.org/show_bug.cgi?id=37523
2
3 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
4 // RUN: %clangxx_msan -O3 %s -o %t && %run %t
5 // REQUIRES: x86_64-target-arch
6
7 #include <assert.h>
8 #include <emmintrin.h>
9
10 int main() {
11   volatile int scale = 5;
12   volatile auto zz = _mm_div_ps(_mm_set1_ps(255), _mm_set1_ps(scale));
13   assert(zz[0] == 51);
14   assert(zz[1] == 51);
15   assert(zz[2] == 51);
16   assert(zz[3] == 51);
17 }