Skip to content

Commit

Permalink
Bug 20810: Use report_fatal_error instead of unreachable
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262455 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
arsenm committed Mar 2, 2016
1 parent 43d3a16 commit 16d6cd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ bool AMDGPUCFGStructurizer::run() {

if (!Finish) {
DEBUG(FuncRep->viewCFG());
llvm_unreachable("IRREDUCIBLE_CFG");
report_fatal_error("IRREDUCIBLE_CFG");
}

return true;
Expand Down Expand Up @@ -1413,10 +1413,10 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
MachineBasicBlock::iterator I = insertInstrBefore(LandBlk, AMDGPU::ENDIF);

if (LandBlkHasOtherPred) {
llvm_unreachable("Extra register needed to handle CFG");
report_fatal_error("Extra register needed to handle CFG");
unsigned CmpResReg =
HeadMBB->getParent()->getRegInfo().createVirtualRegister(I32RC);
llvm_unreachable("Extra compare instruction needed to handle CFG");
report_fatal_error("Extra compare instruction needed to handle CFG");
insertCondBranchBefore(LandBlk, I, AMDGPU::IF_PREDICATE_SET,
CmpResReg, DebugLoc());
}
Expand All @@ -1433,7 +1433,7 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
// need to uncondionally insert the assignment to ensure a path from its
// predecessor rather than headBlk has valid value in initReg if
// (initVal != 1).
llvm_unreachable("Extra register needed to handle CFG");
report_fatal_error("Extra register needed to handle CFG");
}
insertInstrBefore(I, AMDGPU::ELSE);

Expand All @@ -1442,7 +1442,7 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
// need to uncondionally insert the assignment to ensure a path from its
// predecessor rather than headBlk has valid value in initReg if
// (initVal != 0)
llvm_unreachable("Extra register needed to handle CFG");
report_fatal_error("Extra register needed to handle CFG");
}

if (LandBlkHasOtherPred) {
Expand All @@ -1454,7 +1454,7 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
PE = LandBlk->pred_end(); PI != PE; ++PI) {
MachineBasicBlock *MBB = *PI;
if (MBB != TrueMBB && MBB != FalseMBB)
llvm_unreachable("Extra register needed to handle CFG");
report_fatal_error("Extra register needed to handle CFG");
}
}
DEBUG(
Expand Down

0 comments on commit 16d6cd4

Please sign in to comment.