Restore optimisation for sigM.empty()
authorEddie Hung <eddie@fpgeh.com>
Sat, 5 Oct 2019 04:42:46 +0000 (21:42 -0700)
committerEddie Hung <eddie@fpgeh.com>
Sat, 5 Oct 2019 05:31:04 +0000 (22:31 -0700)
passes/pmgen/xilinx_dsp.pmg

index dbc3f74550cb65a17b60e431bc2ed793ada6a1d0..77d4850d4b64cbe1cfe0e4b8dea3d3189899fcf7 100644 (file)
@@ -100,7 +100,10 @@ code sigA sigB sigC sigD sigM clock
                        sigM.append(P[i]);
                }
                log_assert(nusers(P.extract_end(i)) <= 1);
-               log_assert(!sigM.empty());
+               // This sigM could have no users if downstream sinks (e.g. $add) is
+               //   narrower than $mul result, for example
+               if (sigM.empty())
+                       reject;
        }
        else
                sigM = P;