We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e228c8 commit a088c61Copy full SHA for a088c61
llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
@@ -63,10 +63,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
63
return output;
64
}
65
66
- if (auto *RI = dyn_cast<ReturnInst>(T))
67
- return output;
68
-
69
- assert(false && "Unhandled terminator type.");
+ assert(isa<ReturnInst>(T) && "Unhandled terminator type.");
70
71
72
@@ -76,7 +73,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
76
73
BasicBlock *BB,
77
74
const std::unordered_map<BasicBlock *, ConstantInt *> &TargetToValue) {
78
75
auto *T = BB->getTerminator();
79
+ if (isa<ReturnInst>(T))
80
return nullptr;
81
82
IRBuilder<> Builder(BB);
0 commit comments