From aaa66531be04c5ccf78d36d94b28b69e7fc18cce Mon Sep 17 00:00:00 2001 From: Alex Baden Date: Wed, 25 Jun 2025 00:44:00 +0000 Subject: [PATCH] Fix crash when processing getMakeTensorPtr op through while loop --- lib/Dialect/Triton/IR/Utility.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Dialect/Triton/IR/Utility.cpp b/lib/Dialect/Triton/IR/Utility.cpp index af9f798ec6..35ebd9a83f 100644 --- a/lib/Dialect/Triton/IR/Utility.cpp +++ b/lib/Dialect/Triton/IR/Utility.cpp @@ -89,6 +89,9 @@ tt::MakeTensorPtrOp tt::getMakeTensorPtrOp(Value v) { : condBr.getFalseDestOperands()[argNum]); return tt::getMakeTensorPtrOp(argOwner->getOperand(argNum)); } + if (auto whileOp = dyn_cast(argOwner)) { + return tt::getMakeTensorPtrOp(whileOp.getOperand(argNum)); + } llvm_unreachable("Unable to getMakeTensorPtr()"); }