[llvm] [AMDGPU][FixIrreducible][UnifyLoopExits] Support callbr with inline-asm (PR #149308)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 02:32:32 PDT 2025
================
@@ -1766,12 +1766,28 @@ void llvm::InvertBranch(BranchInst *PBI, IRBuilderBase &Builder) {
PBI->swapSuccessors();
}
-bool llvm::hasOnlySimpleTerminator(const Function &F) {
+template <typename... TermInst>
+bool llvm::hasOnlyGivenTerminators(const Function &F) {
for (auto &BB : F) {
auto *Term = BB.getTerminator();
- if (!(isa<ReturnInst>(Term) || isa<UnreachableInst>(Term) ||
- isa<BranchInst>(Term)))
+ if (!(isa<TermInst>(Term) || ...))
----------------
ro-i wrote:
Right, thanks! However, since the terminator check is now not needed for this patch anymore, I reset this to upstream so that we don't have unrelated changes in this patch
https://github.com/llvm/llvm-project/pull/149308
More information about the llvm-commits
mailing list