Skip to content

Commit

Permalink
[FIRRTL] fix missing type conversion in FoldRegMems
Browse files Browse the repository at this point in the history
Signed-off-by: unlsycn <unlsycn@unlsycn.com>
  • Loading branch information
unlsycn committed Nov 27, 2024
1 parent a272e7c commit 8c5cad8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Dialect/FIRRTL/FIRRTLFolds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,8 @@ struct FoldRegMems : public mlir::RewritePattern {

next = rewriter.create<MuxPrimOp>(next.getLoc(), en, masked, next);
}
rewriter.create<MatchingConnectOp>(reg.getLoc(), reg, next);
Value typedNext = rewriter.create<BitCastOp>(next.getLoc(), ty, next);
rewriter.create<MatchingConnectOp>(reg.getLoc(), reg, typedNext);

// Delete the fields and their associated connects.
for (Operation *conn : connects)
Expand Down

0 comments on commit 8c5cad8

Please sign in to comment.