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

Declarations

include/llvm/ADT/APInt.h
 1347   APInt trunc(unsigned width) const;

References

gen/lib/Target/ARM/ARMGenDAGISel.inc
54222     unsigned N16bitSignExt = apIntN.trunc(16).sext(32).getZExtValue();
55099   unsigned N16bitSignExt = apIntN.trunc(16).sext(32).getZExtValue();
include/llvm/ADT/APSInt.h
   99     return APSInt(APInt::trunc(width), IsUnsigned);
include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
  176             DstReg, CstVal.getCImm()->getValue().trunc(DstTy.getSizeInBits()));
include/llvm/Support/KnownBits.h
  113     return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth));
  113     return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth));
lib/Analysis/BasicAliasAnalysis.cpp
  396         Offset = Offset.trunc(SmallWidth).sext(NewWidth).zextOrSelf(OldWidth);
lib/Analysis/DemandedBits.cpp
  267     AB = AOut.trunc(BitWidth);
  270     AB = AOut.trunc(BitWidth);
lib/Analysis/ScalarEvolution.cpp
 1205   MultiplyFactor = MultiplyFactor.trunc(W);
 1617     return TZ < BitWidth ? C.trunc(TZ).zext(BitWidth) : C;
 1632     return TZ < BitWidth ? ConstantStart.trunc(TZ).zext(BitWidth)
 5909           TrueValue = TrueValue.trunc(BitWidth);
 5910           FalseValue = FalseValue.trunc(BitWidth);
 6354                 APInt Trunc = CI->getValue().trunc(Z0TySize);
 8422   APInt I = AD.multiplicativeInverse(Mod).trunc(BW);
 8523     return X->trunc(BitWidth);
lib/Analysis/ValueTracking.cpp
 3239       return ConstantInt::get(Ctx, CI->getValue().trunc(8));
lib/AsmParser/LLLexer.cpp
  958       Tmp = Tmp.trunc(activeBits);
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  639                                         Val.lshr(Offset).trunc(NarrowSize));
  650         Val.lshr(NumParts * NarrowSize).trunc(LeftoverBits));
lib/CodeGen/GlobalISel/Utils.cpp
  278       Val = Val.trunc(OpcodeAndSize.second);
  425       return C1.trunc(Imm).sext(C1.getBitWidth());
lib/CodeGen/InterleavedLoadCombinePass.cpp
  496       A = A.trunc(n);
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
 4644           SDValue NewMask = DAG.getConstant(AndMask.trunc(Size / 2), SL, HalfVT);
 5106     Mask = Mask.trunc(N0Op0.getScalarValueSizeInBits());
 7668                              trunc(TruncVT.getScalarSizeInBits()), DL, TruncVT);
11305       APInt ThisVal = OpVal.trunc(DstBitSize);
14475     NarrowedUsedBits = NarrowedUsedBits.trunc(NarrowedUsedBits.getActiveBits());
14918       APInt NewImm = (Imm & Mask).lshr(ShAmt).trunc(NewBW);
19497         Bits = Bits.trunc(NumSubBits);
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  462         SDValue Lo = DAG.getConstant(IntVal.trunc(32), dl, MVT::i32);
  463         SDValue Hi = DAG.getConstant(IntVal.lshr(32).trunc(32), dl, MVT::i32);
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
 2466   Lo = DAG.getConstant(Cst.trunc(NBitWidth), dl, NVT, IsTarget, IsOpaque);
 2467   Hi = DAG.getConstant(Cst.lshr(NBitWidth).trunc(NBitWidth), dl, NVT, IsTarget,
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
 2197     APInt SrcDemandedBits = DemandedBits.trunc(SrcBitWidth);
 2543       DemandedSub = DemandedSub.trunc(NumSubVectorElts);
 2678           Known.One &= Known2.One.lshr(Offset).trunc(BitWidth);
 2679           Known.Zero &= Known2.Zero.lshr(Offset).trunc(BitWidth);
 3843       DemandedSub = DemandedSub.trunc(NumSubVectorElts);
 4343                   (Val.getBitWidth() == 16) ? Val : Val.trunc(16));
 5316       return getConstant(ShiftedVal.trunc(ElementSize), DL, VT);
 9406     APInt HighValue = SplatValue.lshr(HalfSize).trunc(HalfSize);
 9407     APInt LowValue = SplatValue.trunc(HalfSize);
 9408     APInt HighUndef = SplatUndef.lshr(HalfSize).trunc(HalfSize);
 9409     APInt LowUndef = SplatUndef.trunc(HalfSize);
lib/CodeGen/SelectionDAG/TargetLowering.cpp
 1602     APInt MaskLo = DemandedBits.getLoBits(HalfBitWidth).trunc(HalfBitWidth);
 1603     APInt MaskHi = DemandedBits.getHiBits(HalfBitWidth).trunc(HalfBitWidth);
 1643     APInt InDemandedBits = DemandedBits.trunc(InBits);
 1676     APInt InDemandedBits = DemandedBits.trunc(InBits);
 1716     APInt InDemandedBits = DemandedBits.trunc(InBits);
 1769         HighBits = HighBits.trunc(BitWidth);
 1815       DemandedSrcBits = DemandedSrcBits.trunc(EltBitWidth);
 2718       CVal = CVal.trunc(BVEltWidth);
 3197           SDValue C = DAG.getConstant(C1.trunc(MinBits), dl, MinVT);
 3286                                       DAG.getConstant(bestMask.trunc(bestWidth),
 3337           SDValue NewConst = DAG.getConstant(C1.trunc(InSize), dl, newVT);
 4983                   .trunc(W);
 5170                   .trunc(W);
lib/ExecutionEngine/ExecutionEngine.cpp
  659       GV.IntVal = GV.IntVal.trunc(BitWidth);
lib/ExecutionEngine/Interpreter/Execution.cpp
 1281       Dest.AggregateVal[i].IntVal = Src.AggregateVal[i].IntVal.trunc(DBitWidth);
 1285     Dest.IntVal = Src.IntVal.trunc(DBitWidth);
 1639             Elt.IntVal = Elt.IntVal.trunc(DstBitSize);
lib/IR/ConstantFold.cpp
  227     V = V.trunc(ByteSize*8);
  713                               CI->getValue().trunc(DestBitWidth));
lib/IR/ConstantRange.cpp
  724     Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize));
  743     return ConstantRange(LowerDiv.trunc(DstTySize),
  744                          UpperDiv.trunc(DstTySize)).unionWith(Union);
  751       return ConstantRange(LowerDiv.trunc(DstTySize),
  752                            UpperDiv.trunc(DstTySize)).unionWith(Union);
lib/Support/APFloat.cpp
 3384     significand = significand.trunc(significand.getActiveBits());
lib/Support/APInt.cpp
  934     return trunc(width);
  942     return trunc(width);
lib/Support/APSInt.cpp
   29       Tmp = Tmp.trunc(MinBits);
   35     Tmp = Tmp.trunc(ActiveBits);
lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
 1448       .addImm(Imm.trunc(32).getZExtValue());
lib/Target/ARM/ARMISelLowering.cpp
 6530         SDValue Lo = DAG.getConstant(INTVal.trunc(32), DL, MVT::i32);
 6531         SDValue Hi = DAG.getConstant(INTVal.lshr(32).trunc(32), DL, MVT::i32);
lib/Target/Hexagon/HexagonConstPropagation.cpp
 1647     Result = A1.trunc(Bits).sext(Width);
 1807   APInt LoBits = (Bits < BW) ? A1.trunc(Bits) : A1.zextOrSelf(Bits);
 2097           CI = intToConst(C.trunc(32));
 2129           CI = intToConst(C.trunc(32));
lib/Target/Mips/MipsInstructionSelector.cpp
  497       if (!materialize32BitImm(GPRRegHigh, APImm.getHiBits(32).trunc(32), B))
  499       if (!materialize32BitImm(GPRRegLow, APImm.getLoBits(32).trunc(32), B))
lib/Target/Mips/MipsSEISelLowering.cpp
 1476       SDValue BitImmHiOp = DAG.getConstant(BitImm.lshr(32).trunc(32), DL,
 1478       SDValue BitImmLoOp = DAG.getConstant(BitImm.trunc(32), DL, MVT::i32);
lib/Target/RISCV/RISCVISelLowering.cpp
  944       SDValue Lo = DAG.getConstant(V.trunc(32), DL, MVT::i32);
  945       SDValue Hi = DAG.getConstant(V.lshr(32).trunc(32), DL, MVT::i32);
lib/Target/SystemZ/SystemZISelLowering.cpp
  681     uint64_t Byte = IntBits.lshr(I * 8).trunc(8).getZExtValue();
  752     APInt HighValue = SplatBits.lshr(HalfSize).trunc(HalfSize);
  753     APInt LowValue = SplatBits.trunc(HalfSize);
 6210       SrcDemE = SrcDemE.trunc(NumElts / 2);
 6250         APInt DemEls = DemandedElts.trunc(NumSrc0Els);
lib/Target/X86/X86ISelDAGToDAG.cpp
 3912     MaskVal = MaskVal.trunc(32);
lib/Target/X86/X86ISelLowering.cpp
 5415       Ops.push_back(DAG.getConstant(V.trunc(32), dl, EltVT));
 5416       Ops.push_back(DAG.getConstant(V.lshr(32).trunc(32), dl, EltVT));
34871       APInt DemandedVecBits = OriginalDemandedBits.trunc(VecBitWidth);
35576                            DAG.getConstant(EltBits[0].trunc(32), DL, MVT::i32));
38463             Val = Val.trunc(DstBitsPerElt);
38473             Val = Val.trunc(DstBitsPerElt);
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  842         ConstantInt::get(X->getType(), *C2 + C1->trunc(C2->getBitWidth()));
lib/Transforms/InstCombine/InstCombineCasts.cpp
  835           ConstantInt::get(DestTy, Cst->getValue().trunc(DestSize)));
lib/Transforms/InstCombine/InstCombineCompares.cpp
 2155         ConstantInt::get(TruncTy, C.ashr(*ShiftAmt).trunc(TypeBits - Amt));
 2809         Value *NewC = ConstantInt::get(EltTy, C->trunc(EltTy->getBitWidth()));
 4707         APInt ShortMask = CI->getValue().trunc(MulWidth);
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  399     APInt InputDemandedBits = DemandedMask.trunc(SrcBitWidth);
lib/Transforms/InstCombine/InstructionCombining.cpp
 1299         APInt SmallScale = Scale.trunc(SmallSize);
 2635       APInt TruncatedCase = Case.getCaseValue()->getValue().trunc(NewWidth);
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  592             .trunc(BitWidth);
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  481   const SCEV *C = SE.getConstant(IdxDiff.trunc(BitWidth));
tools/clang/lib/AST/ExprConstant.cpp
 9305           Elt = SValInt.rotl(i*EltSize+FloatEltSize).trunc(FloatEltSize);
 9307           Elt = SValInt.rotr(i*EltSize).trunc(FloatEltSize);
tools/clang/lib/CodeGen/CGExprConstant.cpp
  214       BitsThisChar = BitsThisChar.trunc(CharWidth);
  273     Bits = Bits.trunc(Bits.getBitWidth() - WantedBits);
  603     FieldValue = FieldValue.trunc(FieldSize);
tools/clang/lib/Lex/LiteralSupport.cpp
 1166     StoreVal = Val.trunc(StoreVal.getBitWidth());
tools/clang/lib/Sema/SemaExpr.cpp
 3713         ResultVal = ResultVal.trunc(Width);
tools/polly/lib/Support/GICHelper.cpp
   78     A = A.trunc(A.getMinSignedBits());
unittests/ADT/APIntTest.cpp
 2713               .trunc(BitWidth);
unittests/IR/ConstantRangeTest.cpp
  306   EXPECT_EQ(TOne, ConstantRange(One.getLower().trunc(10),
  307                                 One.getUpper().trunc(10)));