Skip to content

Commit aaa6653

Browse files
committed
Fix crash when processing getMakeTensorPtr op through while loop
1 parent 134494d commit aaa6653

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Dialect/Triton/IR/Utility.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ tt::MakeTensorPtrOp tt::getMakeTensorPtrOp(Value v) {
8989
: condBr.getFalseDestOperands()[argNum]);
9090
return tt::getMakeTensorPtrOp(argOwner->getOperand(argNum));
9191
}
92+
if (auto whileOp = dyn_cast<scf::WhileOp>(argOwner)) {
93+
return tt::getMakeTensorPtrOp(whileOp.getOperand(argNum));
94+
}
9295
llvm_unreachable("Unable to getMakeTensorPtr()");
9396
}
9497

0 commit comments

Comments
 (0)