Skip to content

Commit 72e76ee

Browse files
authored
Adapt to newer llvm terminator checks (#2806)
1 parent 322766c commit 72e76ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

enzyme/Enzyme/GradientUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,9 +2530,9 @@ Value *GradientUtils::fixLCSSA(Instruction *inst, BasicBlock *forwardBlock,
25302530
if (seen.count(cur))
25312531
continue;
25322532
seen.insert(cur);
2533-
auto terminator = cur->getTerminator();
2534-
if (!terminator)
2533+
if (!hasTerminator(cur))
25352534
continue;
2535+
auto terminator = cur->getTerminator();
25362536
for (auto Succ : successors(terminator)) {
25372537
todo.push_back(Succ);
25382538
}

0 commit comments

Comments
 (0)