Skip to content

Commit 770f2a0

Browse files
committed
[FIRRTL] Fix crash in ForceDedup pattern
1 parent 7eb08b1 commit 770f2a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Dialect/FIRRTL/FIRRTLReductions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ struct ForceDedup : public OpReduction<CircuitOp> {
16741674
continue;
16751675

16761676
auto modulesAttr = anno.getMember<ArrayAttr>("modules");
1677-
if (!modulesAttr)
1677+
if (!modulesAttr || modulesAttr.size() < 2)
16781678
continue;
16791679

16801680
// Each dedup group gets its own match with benefit proportional to group

0 commit comments

Comments
 (0)