]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
test for load m128 from u64a function added
authorapostolos <apostolos.tapsas@vectorcamp.gr>
Wed, 10 Nov 2021 07:01:28 +0000 (09:01 +0200)
committerapostolos <apostolos.tapsas@vectorcamp.gr>
Wed, 10 Nov 2021 07:01:28 +0000 (09:01 +0200)
unit/internal/simd_utils.cpp

index 884f2d0adf8adfe437a097fb7b5afd566b633f55..b1b9bfb12703abab8824ac65b077eae926b091be 100644 (file)
@@ -819,6 +819,17 @@ TEST(SimdUtilsTest, sub_u8_m128) {
     EXPECT_TRUE(!diff128(result, loadu128(expec)));
 }
 
+TEST(SimdUtilsTest, load_m128_from_u64a) {
+    srand (time(NULL));
+    u64a tmp = rand();
+    m128 res = load_m128_from_u64a(&tmp);
+    m128 cmp = set2x64(0LL, tmp);
+    //print_m128_16x8("res",res);
+    //print_m128_16x8("cmp",cmp);
+    EXPECT_TRUE(!diff128(res, cmp));
+}
+
+
 TEST(SimdUtilsTest, movemask_128) {
     srand (time(NULL));
     u8 vec[16] = {0};