[compiler-rt] r210020 - [msan] Handle x86 vector pack intrinsics.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Jun 2 05:31:44 PDT 2014
Author: eugenis
Date: Mon Jun 2 07:31:44 2014
New Revision: 210020
URL: http://llvm.org/viewvc/llvm-project?rev=210020&view=rev
Log:
[msan] Handle x86 vector pack intrinsics.
Modified:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=210020&r1=210019&r2=210020&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Mon Jun 2 07:31:44 2014
@@ -3612,6 +3612,27 @@ TEST(VectorShiftTest, avx2_left) {
#endif // __AVX2__
} // namespace
+TEST(VectorPackTest, sse2_packssdw_128) {
+ const unsigned S2_max = (1 << 15) - 1;
+ V4x32 a = {*GetPoisoned<U4>() & 0xFF0000U, *GetPoisoned<U4>() & 0xFFFF0000,
+ S2_max + 100, 4};
+ V4x32 b = {*GetPoisoned<U4>() & 0xFF, S2_max + 10000,
+ *GetPoisoned<U4>() & 0xFF00, S2_max};
+ V8x16 c = _mm_packs_epi32(a, b);
+ EXPECT_POISONED(c[0]);
+ EXPECT_POISONED(c[1]);
+ EXPECT_NOT_POISONED(c[2]);
+ EXPECT_NOT_POISONED(c[3]);
+ EXPECT_POISONED(c[4]);
+ EXPECT_NOT_POISONED(c[5]);
+ EXPECT_POISONED(c[6]);
+ EXPECT_NOT_POISONED(c[7]);
+
+ EXPECT_EQ(c[2], S2_max);
+ EXPECT_EQ(c[3], 4);
+ EXPECT_EQ(c[5], S2_max);
+ EXPECT_EQ(c[7], S2_max);
+}
TEST(MemorySanitizerDr, StoreInDSOTest) {
if (!__msan_has_dynamic_component()) return;
More information about the llvm-commits
mailing list