]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
SuperVector opandnot test enriched
authorapostolos <apostolos.tapsas@vectorcamp.gr>
Wed, 10 Nov 2021 13:12:25 +0000 (15:12 +0200)
committerapostolos <apostolos.tapsas@vectorcamp.gr>
Wed, 10 Nov 2021 13:12:25 +0000 (15:12 +0200)
unit/internal/supervector.cpp

index 9c5f8f3ac3355acc9e1128413284e5902c6e8903..deb3b16906764c5f758197a27f4f902e0d3a47d5 100644 (file)
@@ -155,10 +155,14 @@ TEST(SuperVectorUtilsTest,OPXOR128c){
 TEST(SuperVectorUtilsTest,OPANDNOT128c){
     auto SP1 = SuperVector<16>::Zeroes(); 
     auto SP2 = SuperVector<16>::Ones();
-    SP2 = SP2.opandnot(SP1);
+    SP1 = SP1.opandnot(SP2);
     for (int i=0; i<16; i++) {
-        ASSERT_EQ(SP2.u.s8[i],0);
+        ASSERT_EQ(SP1.u.u8[i],0xff);
     }
+    SP2 = SP2.opandnot(SP1);
+    for (int i=0; i<16; i++) {
+        ASSERT_EQ(SP2.u.u8[i],0);
+    }    
 }
 
 TEST(SuperVectorUtilsTest,Movemask128c){