reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
166 Zero = Builder.getInt64(0); 167 One = Builder.getInt64(1); 169 MSB = Builder.getInt64(63); 172 Zero = Builder.getInt32(0); 173 One = Builder.getInt32(1); 175 MSB = Builder.getInt32(31); 178 ConstantInt *True = Builder.getTrue(); 180 BasicBlock *IBB = Builder.GetInsertBlock(); 217 BasicBlock *SpecialCases = Builder.GetInsertBlock(); 219 BasicBlock *End = SpecialCases->splitBasicBlock(Builder.GetInsertPoint(), 221 BasicBlock *LoopExit = BasicBlock::Create(Builder.getContext(), 223 BasicBlock *DoWhile = BasicBlock::Create(Builder.getContext(), 225 BasicBlock *Preheader = BasicBlock::Create(Builder.getContext(), 227 BasicBlock *BB1 = BasicBlock::Create(Builder.getContext(), 250 Builder.SetInsertPoint(SpecialCases); 251 Value *Ret0_1 = Builder.CreateICmpEQ(Divisor, Zero); 252 Value *Ret0_2 = Builder.CreateICmpEQ(Dividend, Zero); 253 Value *Ret0_3 = Builder.CreateOr(Ret0_1, Ret0_2); 254 Value *Tmp0 = Builder.CreateCall(CTLZ, {Divisor, True}); 255 Value *Tmp1 = Builder.CreateCall(CTLZ, {Dividend, True}); 256 Value *SR = Builder.CreateSub(Tmp0, Tmp1); 257 Value *Ret0_4 = Builder.CreateICmpUGT(SR, MSB); 258 Value *Ret0 = Builder.CreateOr(Ret0_3, Ret0_4); 259 Value *RetDividend = Builder.CreateICmpEQ(SR, MSB); 260 Value *RetVal = Builder.CreateSelect(Ret0, Zero, Dividend); 261 Value *EarlyRet = Builder.CreateOr(Ret0, RetDividend); 262 Builder.CreateCondBr(EarlyRet, End, BB1); 270 Builder.SetInsertPoint(BB1); 271 Value *SR_1 = Builder.CreateAdd(SR, One); 272 Value *Tmp2 = Builder.CreateSub(MSB, SR); 273 Value *Q = Builder.CreateShl(Dividend, Tmp2); 274 Value *SkipLoop = Builder.CreateICmpEQ(SR_1, Zero); 275 Builder.CreateCondBr(SkipLoop, LoopExit, Preheader); 281 Builder.SetInsertPoint(Preheader); 282 Value *Tmp3 = Builder.CreateLShr(Dividend, SR_1); 283 Value *Tmp4 = Builder.CreateAdd(Divisor, NegOne); 284 Builder.CreateBr(DoWhile); 304 Builder.SetInsertPoint(DoWhile); 305 PHINode *Carry_1 = Builder.CreatePHI(DivTy, 2); 306 PHINode *SR_3 = Builder.CreatePHI(DivTy, 2); 307 PHINode *R_1 = Builder.CreatePHI(DivTy, 2); 308 PHINode *Q_2 = Builder.CreatePHI(DivTy, 2); 309 Value *Tmp5 = Builder.CreateShl(R_1, One); 310 Value *Tmp6 = Builder.CreateLShr(Q_2, MSB); 311 Value *Tmp7 = Builder.CreateOr(Tmp5, Tmp6); 312 Value *Tmp8 = Builder.CreateShl(Q_2, One); 313 Value *Q_1 = Builder.CreateOr(Carry_1, Tmp8); 314 Value *Tmp9 = Builder.CreateSub(Tmp4, Tmp7); 315 Value *Tmp10 = Builder.CreateAShr(Tmp9, MSB); 316 Value *Carry = Builder.CreateAnd(Tmp10, One); 317 Value *Tmp11 = Builder.CreateAnd(Tmp10, Divisor); 318 Value *R = Builder.CreateSub(Tmp7, Tmp11); 319 Value *SR_2 = Builder.CreateAdd(SR_3, NegOne); 320 Value *Tmp12 = Builder.CreateICmpEQ(SR_2, Zero); 321 Builder.CreateCondBr(Tmp12, LoopExit, DoWhile); 329 Builder.SetInsertPoint(LoopExit); 330 PHINode *Carry_2 = Builder.CreatePHI(DivTy, 2); 331 PHINode *Q_3 = Builder.CreatePHI(DivTy, 2); 332 Value *Tmp13 = Builder.CreateShl(Q_3, One); 333 Value *Q_4 = Builder.CreateOr(Carry_2, Tmp13); 334 Builder.CreateBr(End); 339 Builder.SetInsertPoint(End, End->begin()); 340 PHINode *Q_5 = Builder.CreatePHI(DivTy, 2);