forked from OSchip/llvm-project
[msan] Tests for vector compare intrinsics.
llvm-svn: 267967
This commit is contained in:
parent
35f3e5e4e7
commit
01c7450ec5
|
@ -3955,7 +3955,48 @@ TEST(VectorMaddTest, mmx_pmadd_wd) {
|
|||
|
||||
EXPECT_EQ((unsigned)(2 * 102 + 3 * 103), c[1]);
|
||||
}
|
||||
#endif // defined(__clang__)
|
||||
|
||||
TEST(VectorCmpTest, mm_cmpneq_ps) {
|
||||
V4x32 c;
|
||||
c = _mm_cmpneq_ps(V4x32{Poisoned<U4>(), 1, 2, 3}, V4x32{4, 5, Poisoned<U4>(), 6});
|
||||
EXPECT_POISONED(c[0]);
|
||||
EXPECT_NOT_POISONED(c[1]);
|
||||
EXPECT_POISONED(c[2]);
|
||||
EXPECT_NOT_POISONED(c[3]);
|
||||
|
||||
c = _mm_cmpneq_ps(V4x32{0, 1, 2, 3}, V4x32{4, 5, 6, 7});
|
||||
EXPECT_NOT_POISONED(c);
|
||||
}
|
||||
|
||||
TEST(VectorCmpTest, mm_cmpneq_sd) {
|
||||
V2x64 c;
|
||||
c = _mm_cmpneq_sd(V2x64{Poisoned<U8>(), 1}, V2x64{2, 3});
|
||||
EXPECT_POISONED(c[0]);
|
||||
c = _mm_cmpneq_sd(V2x64{1, 2}, V2x64{Poisoned<U8>(), 3});
|
||||
EXPECT_POISONED(c[0]);
|
||||
c = _mm_cmpneq_sd(V2x64{1, 2}, V2x64{3, 4});
|
||||
EXPECT_NOT_POISONED(c[0]);
|
||||
c = _mm_cmpneq_sd(V2x64{1, Poisoned<U8>()}, V2x64{2, Poisoned<U8>()});
|
||||
EXPECT_NOT_POISONED(c[0]);
|
||||
c = _mm_cmpneq_sd(V2x64{1, Poisoned<U8>()}, V2x64{1, Poisoned<U8>()});
|
||||
EXPECT_NOT_POISONED(c[0]);
|
||||
}
|
||||
|
||||
TEST(VectorCmpTest, builtin_ia32_ucomisdlt) {
|
||||
U4 c;
|
||||
c = __builtin_ia32_ucomisdlt(V2x64{Poisoned<U8>(), 1}, V2x64{2, 3});
|
||||
EXPECT_POISONED(c);
|
||||
c = __builtin_ia32_ucomisdlt(V2x64{1, 2}, V2x64{Poisoned<U8>(), 3});
|
||||
EXPECT_POISONED(c);
|
||||
c = __builtin_ia32_ucomisdlt(V2x64{1, 2}, V2x64{3, 4});
|
||||
EXPECT_NOT_POISONED(c);
|
||||
c = __builtin_ia32_ucomisdlt(V2x64{1, Poisoned<U8>()}, V2x64{2, Poisoned<U8>()});
|
||||
EXPECT_NOT_POISONED(c);
|
||||
c = __builtin_ia32_ucomisdlt(V2x64{1, Poisoned<U8>()}, V2x64{1, Poisoned<U8>()});
|
||||
EXPECT_NOT_POISONED(c);
|
||||
}
|
||||
|
||||
#endif // defined(__x86_64__) && defined(__clang__)
|
||||
|
||||
TEST(MemorySanitizerOrigins, SetGet) {
|
||||
EXPECT_EQ(TrackingOrigins(), !!__msan_get_track_origins());
|
||||
|
|
Loading…
Reference in New Issue