Skip to content

Commit 43675ce

Browse files
Yun-Flyzhczhong
authored andcommitted
[Transform][Fusion] fix getClosestExtractSliceOfOperand when operand is block argument of function (#304)
1 parent 699bd8e commit 43675ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/gc/Transforms/IterativeTilingAndFusion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ getClosestExtractSliceOfOperand(OpOperand &operand) {
4646
if (auto loop =
4747
dyn_cast<LoopLikeOpInterface>(iterArg.getOwner()->getParentOp()))
4848
return getClosestExtractSliceOfOperand(*loop.getTiedLoopInit(iterArg));
49+
// If operand is not using loop init.
50+
return failure();
4951
}
5052

5153
Operation *defineOp = operand.get().getDefiningOp();

0 commit comments

Comments
 (0)