reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
26 Type *I32Ty = B.getInt32Ty(); 27 auto *F = Function::Create(FunctionType::get(B.getVoidTy(), {I32Ty}, false), 52 B.SetInsertPoint(IfBB); 53 B.CreateCondBr(B.getTrue(), TrueBB, FalseBB); 53 B.CreateCondBr(B.getTrue(), TrueBB, FalseBB); 55 B.SetInsertPoint(TrueBB); 56 Value *AddOp1 = B.CreateAdd(FirstArg, ConstantInt::get(I32Ty, 1)); 57 Value *SubOp1 = B.CreateSub(FirstArg, ConstantInt::get(I32Ty, 2)); 58 B.CreateBr(MergeBB); 60 B.SetInsertPoint(FalseBB); 61 Value *AddOp2 = B.CreateAdd(FirstArg, ConstantInt::get(I32Ty, 3)); 62 Value *SubOp2 = B.CreateSub(FirstArg, ConstantInt::get(I32Ty, 4)); 63 B.CreateBr(MergeBB); 65 B.SetInsertPoint(MergeBB, MergeBB->begin()); 66 auto *I1 = cast<Instruction>(B.CreateAdd(AddOp1, ConstantInt::get(I32Ty, 5))); 67 auto *I2 = cast<Instruction>(B.CreateAdd(AddOp2, ConstantInt::get(I32Ty, 6))); 68 auto *I3 = cast<Instruction>(B.CreateAdd(SubOp1, SubOp2)); 69 auto *I4 = cast<Instruction>(B.CreateSub(SubOp1, SubOp2));