Put sanity check inside the existing '2Pred' case, and simplify
authorCesar Strauss <cestrauss@gmail.com>
Fri, 2 Apr 2021 19:58:48 +0000 (16:58 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Fri, 2 Apr 2021 19:59:29 +0000 (16:59 -0300)
src/soc/sv/trans/svp64.py

index a28f94cd594952c8558c5f59e62075c3c4707087..6bdfb98a1ee41b1b92b6b5239bac55033df6227f 100644 (file)
@@ -500,12 +500,11 @@ class SVP64Asm:
                 if has_smask and smmode == 1:
                     assert has_pmask, \
                         "need explicit dest-mask in CR twin predication"
-
-            # sanity-check that 2Pred mask is same mode
-            if (has_pmask and has_smask) or mask_m_specified:
-                assert smmode == pmmode, \
-                    "predicate masks %s and %s must be same reg type" % \
-                        (pme, sme)
+                # sanity-check that 2Pred mask is same mode
+                if has_pmask and has_smask:
+                    assert smmode == pmmode, \
+                        "predicate masks %s and %s must be same reg type" % \
+                            (pme, sme)
 
             # sanity-check that twin-predication mask only specified in 2P mode
             if ptype == '1P':