| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | TypePromotion.cpp | 232 return EqualTypeSize(Trunc); in isSource() 520 if (Trunc) in TruncateSinks() 521 NewInsts.insert(Trunc); in TruncateSinks() 522 return Trunc; in TruncateSinks() 536 Trunc->moveBefore(Call); in TruncateSinks() 547 Trunc->moveBefore(Switch); in TruncateSinks() 562 Trunc->moveBefore(I); in TruncateSinks() 563 I->setOperand(i, Trunc); in TruncateSinks() 615 Builder.SetInsertPoint(Trunc); in ConvertTruncs() 653 TruncTysMap[Trunc].push_back(Trunc->getDestTy()); in Mutate() [all …]
|
| H A D | InterleavedLoadCombinePass.cpp | 170 Trunc, enumerator 497 pushBOperation(Trunc, APInt(sizeof(n) * 8, n)); in sextOrTrunc() 595 case Trunc: in print()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCasts.cpp | 211 case Instruction::Trunc: in EvaluateInDifferentType() 463 case Instruction::Trunc: in canEvaluateTruncated() 503 Type *DestType = Trunc.getType(); in foldVecTruncToExtElt() 542 shouldChangeType(Trunc.getSrcTy(), Trunc.getType())) && in narrowFunnelShift() 547 Type *DestTy = Trunc.getType(); in narrowFunnelShift() 642 Type *SrcTy = Trunc.getSrcTy(); in narrowBinOp() 643 Type *DestTy = Trunc.getType(); in narrowBinOp() 755 Type *DestTy = Trunc.getType(); in shrinkInsertElt() 793 << Trunc << '\n'); in visitTrunc() 830 return &Trunc; in visitTrunc() [all …]
|
| H A D | InstCombineShifts.cpp | 72 Value *Trunc = nullptr; in reassociateShiftAmtsOfTwoSameDirectionShifts() local 74 m_CombineOr(m_CombineAnd(m_Trunc(m_Instruction(Sh1)), m_Value(Trunc)), in reassociateShiftAmtsOfTwoSameDirectionShifts() 104 if (Trunc && !AnalyzeForSignBitExtraction && in reassociateShiftAmtsOfTwoSameDirectionShifts() 126 if (HadTwoRightShifts && (Trunc || AnalyzeForSignBitExtraction)) { in reassociateShiftAmtsOfTwoSameDirectionShifts() 145 if (!Trunc) { in reassociateShiftAmtsOfTwoSameDirectionShifts() 159 if (Trunc) { in reassociateShiftAmtsOfTwoSameDirectionShifts() 161 Ret = CastInst::Create(Instruction::Trunc, NewShift, Sh0->getType()); in reassociateShiftAmtsOfTwoSameDirectionShifts() 196 Value *Trunc; in dropRedundantMaskingOfLeftShiftInput() local 198 !Trunc->hasOneUse()) in dropRedundantMaskingOfLeftShiftInput() 932 Value *Trunc = Builder.CreateTrunc(NewShift, Ty, "tr.sh.diff"); in visitShl() local [all …]
|
| H A D | InstCombineInternal.h | 324 Instruction *narrowBinOp(TruncInst &Trunc); 327 Instruction *narrowFunnelShift(TruncInst &Trunc); 691 Instruction *foldICmpTruncConstant(ICmpInst &Cmp, TruncInst *Trunc,
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | IntegerDivision.cpp | 507 Value *Trunc; in expandRemainderUpTo32Bits() local 519 Trunc = Builder.CreateTrunc(ExtRem, RemTy); in expandRemainderUpTo32Bits() 521 Rem->replaceAllUsesWith(Trunc); in expandRemainderUpTo32Bits() 555 Value *Trunc; in expandRemainderUpTo64Bits() local 567 Trunc = Builder.CreateTrunc(ExtRem, RemTy); in expandRemainderUpTo64Bits() 569 Rem->replaceAllUsesWith(Trunc); in expandRemainderUpTo64Bits() 604 Value *Trunc; in expandDivisionUpTo32Bits() local 616 Trunc = Builder.CreateTrunc(ExtDiv, DivTy); in expandDivisionUpTo32Bits() 618 Div->replaceAllUsesWith(Trunc); in expandDivisionUpTo32Bits() 653 Value *Trunc; in expandDivisionUpTo64Bits() local [all …]
|
| H A D | BypassSlowDivision.cpp | 295 Builder.CreateCast(Instruction::Trunc, Divisor, BypassType); in createFastBB() 297 Builder.CreateCast(Instruction::Trunc, Dividend, BypassType); in createFastBB()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPULowerKernelArguments.cpp | 220 Value *Trunc = Builder.CreateTrunc(ExtractBits, ArgIntTy); in runOnFunction() local 221 Value *NewVal = Builder.CreateBitCast(Trunc, ArgTy, in runOnFunction()
|
| H A D | AMDGPUISelLowering.cpp | 1744 SDValue Mad2 = DAG.getNode(FMAD, DL, MVT::f32, Trunc, in LowerUDIVREM64() 2024 SDValue Neg = DAG.getNode(ISD::FNEG, SL, VT, Trunc, Flags); in LowerFREM() 2037 SDValue Trunc = DAG.getNode(ISD::FTRUNC, SL, MVT::f64, Src); in LowerFCEIL() local 2051 return DAG.getNode(ISD::FADD, SL, MVT::f64, Trunc, Add); in LowerFCEIL() 2205 return DAG.getNode(ISD::FADD, SL, MVT::f64, Trunc, Add); in LowerFFLOOR() 2531 SDValue Trunc = DAG.getNode(ISD::FTRUNC, SL, SrcVT, Src); in LowerFP_TO_INT64() local 2542 Trunc = DAG.getNode(ISD::FABS, SL, SrcVT, Trunc); in LowerFP_TO_INT64() 2558 SDValue Mul = DAG.getNode(ISD::FMUL, SL, SrcVT, Trunc, K0); in LowerFP_TO_INT64() 3252 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, MidVT, in performTruncateCombine() local 3254 DCI.AddToWorklist(Trunc.getNode()); in performTruncateCombine() [all …]
|
| /llvm-project-15.0.7/clang/lib/AST/Interp/ |
| H A D | Interp.h | 122 SmallString<32> Trunc; in AddSubMulHelper() local 123 Value.trunc(Result.bitWidth()).toString(Trunc, 10); in AddSubMulHelper() 125 S.report(Loc, diag::warn_integer_constant_overflow) << Trunc << Type; in AddSubMulHelper() 848 unsigned Trunc(InterpState &S, CodePtr OpPC, unsigned Bits, const T &V) { in Trunc() function 906 return ShiftLeft<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, -RHS)); in Shr() 908 return ShiftRight<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, RHS)); in Shr() 921 return ShiftRight<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, -RHS)); in Shl() 923 return ShiftLeft<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, RHS)); in Shl()
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/abseil/ |
| H A D | duration-conversion-cast.rst | 31 and you should use ``absl::Trunc`` to perform this operation explicitly instead.
|
| H A D | duration-unnecessary-conversion.rst | 57 ``absl::Trunc`` to truncate explicitly.
|
| /llvm-project-15.0.7/llvm/lib/Transforms/AggressiveInstCombine/ |
| H A D | TruncInstCombine.cpp | 51 case Instruction::Trunc: in getRelevantOperands() 128 case Instruction::Trunc: in buildTruncExpressionGraph() 394 case Instruction::Trunc: in ReduceExpressionGraph()
|
| /llvm-project-15.0.7/libc/test/src/math/ |
| H A D | TruncTest.h | 74 ASSERT_MPFR_MATCH(mpfr::Operation::Trunc, x, func(x), 0.0); in testRange()
|
| /llvm-project-15.0.7/llvm/test/CodeGen/X86/ |
| H A D | x86-64-jumps.ll | 18 ; PR5930 - Trunc of block address differences.
|
| /llvm-project-15.0.7/llvm/lib/Target/ARM/ |
| H A D | ARMParallelDSP.cpp | 791 Value *Trunc = IRB.CreateTrunc(Top, OffsetTy); in CreateWideLoad() local 792 Value *NewOffsetSExt = IRB.CreateSExt(Trunc, OffsetSExt->getType()); in CreateWideLoad() 802 << *Trunc << "\n" in CreateWideLoad()
|
| H A D | MVELaneInterleavingPass.cpp | 178 case Instruction::Trunc: in tryInterleave()
|
| H A D | MVEGatherScatterLowering.cpp | 572 Load = TruncInst::Create(Instruction::Trunc, Load, MemoryTy); in tryCreateMaskedGatherOffset() 674 if (TruncInst *Trunc = dyn_cast<TruncInst>(Input)) { in tryCreateMaskedScatterOffset() local 675 Value *PreTrunc = Trunc->getOperand(0); in tryCreateMaskedScatterOffset()
|
| /llvm-project-15.0.7/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyFastISel.cpp | 974 const auto *Trunc = cast<TruncInst>(I); in selectTrunc() local 976 Register Reg = getRegForValue(Trunc->getOperand(0)); in selectTrunc() 980 if (Trunc->getOperand(0)->getType()->isIntegerTy(64)) { in selectTrunc() 988 updateValueMap(Trunc, Reg); in selectTrunc() 1402 case Instruction::Trunc: in fastSelectInstruction()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | SpeculativeExecution.cpp | 248 case Instruction::Trunc: in ComputeSpeculationCost()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | TypeMetadataUtils.cpp | 170 case Instruction::Trunc: in getPointerAtOffset()
|
| /llvm-project-15.0.7/llvm/unittests/IR/ |
| H A D | IRBuilderTest.cpp | 227 TruncInst *Trunc = cast<TruncInst>(StepVec); in TEST_F() local 228 EXPECT_EQ(Trunc->getDestTy(), DstVecTy); in TEST_F() 229 EXPECT_EQ(Trunc->getSrcTy(), VecI8Ty); in TEST_F() 230 EXPECT_TRUE(isa<CallInst>(Trunc->getOperand(0))); in TEST_F() 232 CallInst *Call = cast<CallInst>(Trunc->getOperand(0)); in TEST_F()
|
| /llvm-project-15.0.7/llvm/lib/Target/LoongArch/ |
| H A D | LoongArchISelLowering.cpp | 153 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Op.getOperand(0)); in lowerUINT_TO_FP() local 154 SDValue Res = DAG.getNode(ISD::UINT_TO_FP, DL, MVT::f64, Trunc); in lowerUINT_TO_FP() 187 SDValue Trunc = DAG.getNode(LoongArchISD::FTINT, DL, FPTy, Op.getOperand(0)); in lowerFP_TO_SINT() local 188 return DAG.getNode(ISD::BITCAST, DL, Op.getValueType(), Trunc); in lowerFP_TO_SINT()
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Instructions.cpp | 2885 case Instruction::Trunc: in isIntegerCast() 2925 case Instruction::Trunc: in isNoopCast() 3212 case Trunc: return new TruncInst (S, Ty, Name, InsertAtEnd); in Create() 3266 return Create(Instruction::Trunc, S, Ty, Name, InsertBefore); in CreateTruncOrBitCast() 3274 return Create(Instruction::Trunc, S, Ty, Name, InsertAtEnd); in CreateTruncOrBitCast() 3360 (SrcBits > DstBits ? Instruction::Trunc : in CreateIntegerCast() 3374 (SrcBits > DstBits ? Instruction::Trunc : in CreateIntegerCast() 3495 return Trunc; // int -> smaller int in getCastOpcode() 3593 case Instruction::Trunc: in castIsValid() 3671 ) : CastInst(Ty, Trunc, S, Name, InsertBefore) { in TruncInst() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/ |
| H A D | LoopVectorize.cpp | 1363 if (!Trunc) in isOptimizableIVTruncate() 1375 Value *Op = Trunc->getOperand(0); in isOptimizableIVTruncate() 3565 case Instruction::Trunc: in truncateToMinimalBitwidths() 3926 if (U != Trunc) { in fixReduction() 7166 case Instruction::Trunc: in getInstructionCost() 7213 auto *Trunc = cast<TruncInst>(I); in getInstructionCost() local 7214 return TTI.getCastInstrCost(Instruction::Trunc, Trunc->getDestTy(), in getInstructionCost() 7215 Trunc->getSrcTy(), CCH, CostKind, Trunc); in getInstructionCost() 8327 case Instruction::Trunc: in tryToWiden() 9236 TruncInst *Trunc = getTruncInst(); in execute() local [all …]
|