Skip to content

Commit 8eaad2d

Browse files
committed
Skip ops under if
1 parent b85979b commit 8eaad2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Conversion/TritonToUnstructured/TritonToUnstructuredPass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ class TritonToUnstructuredPass
317317
return success();
318318
})
319319
.Case<triton::AddPtrOp>([&](triton::AddPtrOp addptr) {
320-
// Bail when we have an addptr directly under an scf.if as we
321-
// do not know if the pointer returning from both branches
322-
// will have the same source
323-
if (dyn_cast<scf::IfOp>(addptr->getParentOp())) {
320+
// Bail when we have an addptr in an scf.if as we do not know
321+
// if the pointer returning from both branches will have the
322+
// same source
323+
if (addptr->getParentOfType<scf::IfOp>()) {
324324
return failure();
325325
}
326326

0 commit comments

Comments
 (0)