| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | APFixedPoint.cpp | 22 unsigned DstWidth = DstSema.getWidth(); in convert() local 59 NewVal = NewVal.extOrTrunc(DstWidth); in convert() 415 APSInt APFixedPoint::convertToInt(unsigned DstWidth, bool DstSign, in convertToInt() argument 420 APSInt DstMin = APSInt::getMinValue(DstWidth, !DstSign); in convertToInt() 421 APSInt DstMax = APSInt::getMaxValue(DstWidth, !DstSign); in convertToInt() 423 if (SrcWidth < DstWidth) { in convertToInt() 424 Result = Result.extend(DstWidth); in convertToInt() 425 } else if (SrcWidth > DstWidth) { in convertToInt() 441 return Result.extOrTrunc(DstWidth); in convertToInt()
|
| /llvm-project-15.0.7/llvm/include/llvm/IR/ |
| H A D | FixedPointBuilder.h | 36 unsigned DstWidth = DstSema.getWidth(); in Convert() local 42 Type *DstIntTy = B.getIntNTy(DstWidth); in Convert() 77 ResultWidth = std::max(SrcWidth + DstScale - SrcScale, DstWidth); in Convert() 104 if (ResultWidth != DstWidth) in Convert() 153 unsigned DstWidth, bool DstIsSigned) { in CreateFixedToInteger() argument 156 FixedPointSemantics::GetIntegerSemantics(DstWidth, DstIsSigned), true); in CreateFixedToInteger()
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | APFixedPoint.h | 168 APSInt convertToInt(unsigned DstWidth, bool DstSign,
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | ConstantFold.cpp | 1042 unsigned DstWidth = CI2->getType()->getBitWidth(); in ConstantFoldBinaryInstruction() local 1045 APInt PossiblySetBits(APInt::getLowBitsSet(DstWidth, SrcWidth)); in ConstantFoldBinaryInstruction() 1081 unsigned DstWidth = CI2->getType()->getBitWidth(); in ConstantFoldBinaryInstruction() local 1082 unsigned SrcWidth = std::min(DstWidth, Log2(*GVAlign)); in ConstantFoldBinaryInstruction() 1083 APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth)); in ConstantFoldBinaryInstruction()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCasts.cpp | 1790 unsigned DstWidth = Ty->getFPMantissaWidth(); in visitFPTrunc() local 1813 if (OpWidth >= 2*DstWidth+1 && DstWidth >= SrcWidth) { in visitFPTrunc() 1827 if (OpWidth >= LHSWidth + RHSWidth && DstWidth >= SrcWidth) { in visitFPTrunc() 1840 if (OpWidth >= 2*DstWidth && DstWidth >= SrcWidth) { in visitFPTrunc()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | SimplifyLibCalls.cpp | 1727 static Value *getIntToFPVal(Value *I2F, IRBuilderBase &B, unsigned DstWidth) { in getIntToFPVal() argument 1733 if (BitWidth < DstWidth || in getIntToFPVal() 1734 (BitWidth == DstWidth && isa<SIToFPInst>(I2F))) in getIntToFPVal() 1735 return isa<SIToFPInst>(I2F) ? B.CreateSExt(Op, B.getIntNTy(DstWidth)) in getIntToFPVal() 1736 : B.CreateZExt(Op, B.getIntNTy(DstWidth)); in getIntToFPVal()
|
| /llvm-project-15.0.7/clang/lib/Sema/ |
| H A D | SemaStmt.cpp | 1639 unsigned DstWidth = Context.getIntWidth(DstType); in DiagnoseAssignmentEnum() local 1643 AdjustAPSInt(RhsVal, DstWidth, DstIsSigned); in DiagnoseAssignmentEnum() 1662 AdjustAPSInt(Val, DstWidth, DstIsSigned); in DiagnoseAssignmentEnum()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | TargetLowering.cpp | 9539 unsigned DstWidth = DstVT.getScalarSizeInBits(); in expandFP_TO_INT_SAT() local 9540 assert(SatWidth <= DstWidth && in expandFP_TO_INT_SAT() 9547 MinInt = APInt::getSignedMinValue(SatWidth).sext(DstWidth); in expandFP_TO_INT_SAT() 9548 MaxInt = APInt::getSignedMaxValue(SatWidth).sext(DstWidth); in expandFP_TO_INT_SAT() 9550 MinInt = APInt::getMinValue(SatWidth).zext(DstWidth); in expandFP_TO_INT_SAT() 9551 MaxInt = APInt::getMaxValue(SatWidth).zext(DstWidth); in expandFP_TO_INT_SAT()
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/ |
| H A D | AArch64ISelLowering.cpp | 3921 uint64_t DstWidth = DstVT.getScalarSizeInBits(); in LowerFP_TO_INT_SAT() local 3922 assert(SatWidth <= DstWidth && "Saturation width cannot exceed result width"); in LowerFP_TO_INT_SAT() 3942 if (DstWidth < SatWidth) in LowerFP_TO_INT_SAT() 3950 APInt::getSignedMaxValue(SatWidth).sext(DstWidth), DL, DstVT); in LowerFP_TO_INT_SAT() 3953 APInt::getSignedMinValue(SatWidth).sext(DstWidth), DL, DstVT); in LowerFP_TO_INT_SAT() 3957 APInt::getAllOnesValue(SatWidth).zext(DstWidth), DL, DstVT); in LowerFP_TO_INT_SAT()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86ISelLowering.cpp | 22756 unsigned DstWidth = DstVT.getScalarSizeInBits(); in LowerFP_TO_INT_SAT() local 22758 assert(SatWidth <= DstWidth && SatWidth <= TmpWidth && in LowerFP_TO_INT_SAT() 22783 MinInt = APInt::getSignedMinValue(SatWidth).sext(DstWidth); in LowerFP_TO_INT_SAT() 22784 MaxInt = APInt::getSignedMaxValue(SatWidth).sext(DstWidth); in LowerFP_TO_INT_SAT() 22786 MinInt = APInt::getMinValue(SatWidth).zext(DstWidth); in LowerFP_TO_INT_SAT() 22787 MaxInt = APInt::getMaxValue(SatWidth).zext(DstWidth); in LowerFP_TO_INT_SAT()
|