reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  657   Type *I32Ty = Builder.getInt32Ty();
  658   Type *F32Ty = Builder.getFloatTy();
  659   ConstantInt *One = Builder.getInt32(1);
  664     JQ = Builder.CreateXor(Num, Den);
  667     JQ = Builder.CreateAShr(JQ, Builder.getInt32(30));
  667     JQ = Builder.CreateAShr(JQ, Builder.getInt32(30));
  670     JQ = Builder.CreateOr(JQ, One);
  680   Value *FA = IsSigned ? Builder.CreateSIToFP(IA, F32Ty)
  681                        : Builder.CreateUIToFP(IA, F32Ty);
  684   Value *FB = IsSigned ? Builder.CreateSIToFP(IB,F32Ty)
  685                        : Builder.CreateUIToFP(IB,F32Ty);
  687   Value *RCP = Builder.CreateFDiv(ConstantFP::get(F32Ty, 1.0), FB);
  688   Value *FQM = Builder.CreateFMul(FA, RCP);
  691   CallInst *FQ = Builder.CreateUnaryIntrinsic(Intrinsic::trunc, FQM);
  692   FQ->copyFastMathFlags(Builder.getFastMathFlags());
  695   Value *FQNeg = Builder.CreateFNeg(FQ);
  698   Value *FR = Builder.CreateIntrinsic(Intrinsic::amdgcn_fmad_ftz,
  702   Value *IQ = IsSigned ? Builder.CreateFPToSI(FQ, I32Ty)
  703                        : Builder.CreateFPToUI(FQ, I32Ty);
  706   FR = Builder.CreateUnaryIntrinsic(Intrinsic::fabs, FR, FQ);
  709   FB = Builder.CreateUnaryIntrinsic(Intrinsic::fabs, FB, FQ);
  712   Value *CV = Builder.CreateFCmpOGE(FR, FB);
  715   JQ = Builder.CreateSelect(CV, JQ, Builder.getInt32(0));
  715   JQ = Builder.CreateSelect(CV, JQ, Builder.getInt32(0));
  718   Value *Div = Builder.CreateAdd(IQ, JQ);
  723     Value *Rem = Builder.CreateMul(Div, Den);
  724     Res = Builder.CreateSub(Num, Rem);
  729     Res = Builder.CreateTrunc(Res, Builder.getIntNTy(DivBits));
  729     Res = Builder.CreateTrunc(Res, Builder.getIntNTy(DivBits));
  730     Res = Builder.CreateSExt(Res, Ty);
  732     ConstantInt *TruncMask = Builder.getInt32((UINT64_C(1) << DivBits) - 1);
  733     Res = Builder.CreateAnd(Res, TruncMask);