Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions llvm_util/llvm2alive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,12 @@ class llvm2alive_ : public llvm::InstVisitor<llvm2alive_, unique_ptr<Instr>> {
return phi;
}

RetTy visitBranchInst(llvm::BranchInst &i) {
auto &dst_true = getBB(i.getSuccessor(0));
if (i.isUnconditional())
return make_unique<Branch>(dst_true);
RetTy visitUncondBrInst(llvm::UncondBrInst &i) {
return make_unique<Branch>(getBB(i.getSuccessor(0)));
}

RetTy visitCondBrInst(llvm::CondBrInst &i) {
auto &dst_true = getBB(i.getSuccessor(0));
auto &dst_false = getBB(i.getSuccessor(1));
auto cond = get_operand(i.getCondition());
if (!cond)
Expand Down
4 changes: 2 additions & 2 deletions tools/quick-fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ void BBFuzzer::go() {
} break;
case 1: {
auto *Dest = BBs[1 + C.choose(NumBBs - 1)];
BranchInst::Create(Dest, BBs[i]);
UncondBrInst::Create(Dest, BBs[i]);
} break;
case 2: {
auto *Dest1 = BBs[1 + C.choose(NumBBs - 1)];
Expand All @@ -861,7 +861,7 @@ void BBFuzzer::go() {
: (Value *)ConstantInt::get(IntTy, C.choose(20));
Cond = new ICmpInst(BBs[i], VG.randomPred(), LHS, RHS);
}
BranchInst::Create(Dest1, Dest2, Cond, BBs[i]);
CondBrInst::Create(Cond, Dest1, Dest2, BBs[i]);
} break;
case 3: {
unsigned long NumCases = 1 + C.choose(2 * NumBBs);
Expand Down
Loading