mirror of
https://github.com/verilator/verilator.git
synced 2026-09-01 18:36:28 +02:00
Fix missed optimization in V3Delayed (#5089)
Checking the wrong node meant we never actually pushed constant bit-select indices into the delayed update, as was the intention, but always generated a temporary instead.
This commit is contained in:
+1
-1
@@ -277,7 +277,7 @@ class DelayedVisitor final : public VNVisitor {
|
||||
AstNodeExpr* bitreadp = nullptr; // Code to read Vdlyvlsb
|
||||
if (bitselp) {
|
||||
AstNodeExpr* const lsbvaluep = bitselp->lsbp()->unlinkFrBack();
|
||||
if (VN_IS(bitselp->fromp(), Const)) {
|
||||
if (VN_IS(lsbvaluep, Const)) {
|
||||
// vlsb = constant, can just push constant into where we use it
|
||||
bitreadp = lsbvaluep;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user