This started as a small change, I swear. Unfortunately, lots of things call the...
[oota-llvm.git] / examples / BrainF / BrainF.cpp
index 058ef8c72de874f0eaed81eff06794c958ddba8f..cd9e850728f153f10a0dcfac06cb1e0e128bc4be 100644 (file)
@@ -427,9 +427,8 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb) {
       LoadInst *tape_0 = new LoadInst(head_0, tapereg, testbb);
 
       //%test.%d = icmp eq i8 %tape.%d, 0
-      ICmpInst *test_0 = new ICmpInst(ICmpInst::ICMP_EQ, tape_0,
-                                      ConstantInt::get(APInt(8, 0)), testreg,
-                                      testbb);
+      ICmpInst *test_0 = new ICmpInst(*testbb, ICmpInst::ICMP_EQ, tape_0,
+                                      ConstantInt::get(APInt(8, 0)), testreg);
 
       //br i1 %test.%d, label %main.%d, label %main.%d
       BasicBlock *bb_0 = BasicBlock::Create(label, brainf_func);