Skip to content

Commit 5e42208

Browse files
yifeizh2zhczhong
authored andcommitted
fix arg order
1 parent 876455c commit 5e42208

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/gc/Transforms/EliminateConstantWeightPack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ void EliminateConstantWeightPack::runOnOperation() {
7979
argPack->getLoc(), ty.getShape(), ty.getElementType());
8080
rewriter.replaceAllUsesWith(srcVal, argReplace);
8181
parentBlock->eraseArgument(idx);
82-
parentBlock->addArgument(newArgTy, argPack->getLoc());
83-
Value newPackedArg = parentBlock->getArguments().back();
82+
parentBlock->insertArgument(idx, newArgTy, argPack->getLoc());
83+
Value newPackedArg = parentBlock->getArguments()[idx];
8484
rewriter.replaceAllUsesWith(
8585
packedMatmul.getDpsInputOperands()[1]->get(), newPackedArg);
8686
updated = true;

0 commit comments

Comments
 (0)