Home
last modified time | relevance | path

Searched refs:Trunc (Results 1 – 25 of 120) sorted by relevance

12345

/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DTypePromotion.cpp241 else if (auto *Trunc = dyn_cast<TruncInst>(V)) in isSource() local
242 return EqualTypeSize(Trunc); in isSource()
538 auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy)); in TruncateSinks() local
539 if (Trunc) in TruncateSinks()
540 NewInsts.insert(Trunc); in TruncateSinks()
541 return Trunc; in TruncateSinks()
554 if (Instruction *Trunc = InsertTrunc(Arg, Ty)) { in TruncateSinks() local
555 Trunc->moveBefore(Call); in TruncateSinks()
556 Call->setArgOperand(i, Trunc); in TruncateSinks()
565 if (Instruction *Trunc = InsertTrunc(Switch->getCondition(), Ty)) { in TruncateSinks() local
[all …]
H A DCodeGenCommonISel.cpp218 MachineInstr &Trunc, in getSalvageOpsForTrunc() argument
220 assert(Trunc.getOpcode() == TargetOpcode::G_TRUNC && "Must be a G_TRUNC"); in getSalvageOpsForTrunc()
222 const auto FromLLT = MRI.getType(Trunc.getOperand(1).getReg()); in getSalvageOpsForTrunc()
223 const auto ToLLT = MRI.getType(Trunc.defs().begin()->getReg()); in getSalvageOpsForTrunc()
233 return &Trunc.getOperand(1); in getSalvageOpsForTrunc()
H A DInterleavedLoadCombinePass.cpp171 Trunc, enumerator
498 pushBOperation(Trunc, APInt(sizeof(n) * 8, n)); in sextOrTrunc()
596 case Trunc: in print()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineCasts.cpp56 case Instruction::Trunc: in EvaluateInDifferentType()
183 (CI.getOpcode() == Instruction::Trunc && in commonCastTransforms()
349 case Instruction::Trunc: in canEvaluateTruncated()
401 static Instruction *foldVecTruncToExtElt(TruncInst &Trunc, in foldVecTruncToExtElt() argument
403 Value *TruncOp = Trunc.getOperand(0); in foldVecTruncToExtElt()
404 Type *DestType = Trunc.getType(); in foldVecTruncToExtElt()
441 Instruction *InstCombinerImpl::narrowFunnelShift(TruncInst &Trunc) { in narrowFunnelShift() argument
442 assert((isa<VectorType>(Trunc.getSrcTy()) || in narrowFunnelShift()
443 shouldChangeType(Trunc.getSrcTy(), Trunc.getType())) && in narrowFunnelShift()
448 Type *DestTy = Trunc.getType(); in narrowFunnelShift()
[all …]
H A DInstCombineShifts.cpp72 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()
150 if (!Trunc) { in reassociateShiftAmtsOfTwoSameDirectionShifts()
164 if (Trunc) { in reassociateShiftAmtsOfTwoSameDirectionShifts()
166 Ret = CastInst::Create(Instruction::Trunc, NewShift, Sh0->getType()); in reassociateShiftAmtsOfTwoSameDirectionShifts()
201 Value *Trunc; in dropRedundantMaskingOfLeftShiftInput() local
202 if (match(Masked, m_CombineAnd(m_Trunc(m_Value(Masked)), m_Value(Trunc))) && in dropRedundantMaskingOfLeftShiftInput()
203 !Trunc->hasOneUse()) in dropRedundantMaskingOfLeftShiftInput()
[all …]
H A DInstCombineInternal.h390 Instruction *narrowBinOp(TruncInst &Trunc);
393 Instruction *narrowFunnelShift(TruncInst &Trunc);
683 Instruction *foldICmpTruncConstant(ICmpInst &Cmp, TruncInst *Trunc,
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DIntegerDivision.cpp479 Value *Trunc; in expandRemainderUpTo32Bits() local
491 Trunc = Builder.CreateTrunc(ExtRem, RemTy); in expandRemainderUpTo32Bits()
493 Rem->replaceAllUsesWith(Trunc); in expandRemainderUpTo32Bits()
525 Value *Trunc; in expandRemainderUpTo64Bits() local
537 Trunc = Builder.CreateTrunc(ExtRem, RemTy); in expandRemainderUpTo64Bits()
539 Rem->replaceAllUsesWith(Trunc); in expandRemainderUpTo64Bits()
574 Value *Trunc; in expandDivisionUpTo32Bits() local
586 Trunc = Builder.CreateTrunc(ExtDiv, DivTy); in expandDivisionUpTo32Bits()
588 Div->replaceAllUsesWith(Trunc); in expandDivisionUpTo32Bits()
620 Value *Trunc; in expandDivisionUpTo64Bits() local
[all …]
H A DBypassSlowDivision.cpp293 Builder.CreateCast(Instruction::Trunc, Divisor, BypassType); in createFastBB()
295 Builder.CreateCast(Instruction::Trunc, Dividend, BypassType); in createFastBB()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlanTransforms.cpp545 BaseIV = new VPScalarCastRecipe(Instruction::Trunc, BaseIV, TruncTy); in createScalarIVSteps()
556 Step = new VPScalarCastRecipe(Instruction::Trunc, Step, ResultTy); in createScalarIVSteps()
1006 VPValue *Trunc = R.getVPSingleValue(); in simplifyRecipe() local
1007 Type *TruncTy = TypeInfo.inferScalarType(Trunc); in simplifyRecipe()
1010 Trunc->replaceAllUsesWith(A); in simplifyRecipe()
1027 Trunc->replaceAllUsesWith(VPC); in simplifyRecipe()
1029 auto *VPC = new VPWidenCastRecipe(Instruction::Trunc, A, TruncTy); in simplifyRecipe()
1031 Trunc->replaceAllUsesWith(VPC); in simplifyRecipe()
1187 ? new VPWidenCastRecipe(Instruction::Trunc, Op, NewResTy) in truncateToMinimalBitwidths()
1464 OpVPEVL = new VPScalarCastRecipe(IVSize < 32 ? Instruction::Trunc in tryAddExplicitVectorLength()
H A DVPlanPatternMatch.h242 inline AllUnaryRecipe_match<Op0_t, Instruction::Trunc>
244 return m_Unary<Instruction::Trunc, Op0_t>(Op0);
H A DVPlan.h1770 TruncInst *Trunc; variable
1777 Trunc(nullptr), IndDesc(IndDesc) { in VPWidenIntOrFpInductionRecipe()
1783 TruncInst *Trunc) in VPWidenIntOrFpInductionRecipe() argument
1784 : VPHeaderPHIRecipe(VPDef::VPWidenIntOrFpInductionSC, Trunc, Start), in VPWidenIntOrFpInductionRecipe()
1785 IV(IV), Trunc(Trunc), IndDesc(IndDesc) { in VPWidenIntOrFpInductionRecipe()
1793 getStepValue(), IndDesc, Trunc); in clone()
1828 TruncInst *getTruncInst() { return Trunc; } in getTruncInst()
1829 const TruncInst *getTruncInst() const { return Trunc; } in getTruncInst()
1843 return Trunc ? Trunc->getType() : IV->getType(); in getScalarType()
H A DVPlanAnalysis.cpp198 case Instruction::Trunc: in inferScalarTypeForRecipe()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/
H A DTruncInstCombine.cpp47 /// that instruction, with respect to the Trunc expression graph optimizaton.
51 case Instruction::Trunc: in getRelevantOperands()
128 case Instruction::Trunc: in buildTruncExpressionGraph()
394 case Instruction::Trunc: in ReduceExpressionGraph()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerKernelArguments.cpp267 Value *Trunc = Builder.CreateTrunc(ExtractBits, ArgIntTy); in lowerKernelArguments() local
268 Value *NewVal = Builder.CreateBitCast(Trunc, ArgTy, in lowerKernelArguments()
H A DAMDGPULateCodeGenPrepare.cpp257 Instruction *Trunc = cast<Instruction>( in convertFromOptType() local
259 return cast<Instruction>(Builder.CreateBitCast(Trunc, NewVTy)); in convertFromOptType()
H A DAMDGPUISelLowering.cpp2080 SDValue Trunc = DAG.getNode(ISD::FTRUNC, DL, MVT::f32, Mul2); in LowerUDIVREM64() local
2081 SDValue Mad2 = DAG.getNode(FMAD, DL, MVT::f32, Trunc, in LowerUDIVREM64()
2085 SDValue Rcp_Hi = DAG.getNode(ISD::FP_TO_UINT, DL, HalfVT, Trunc); in LowerUDIVREM64()
2358 SDValue Trunc = DAG.getNode(ISD::FTRUNC, SL, VT, Div, Flags); in LowerFREM() local
2359 SDValue Neg = DAG.getNode(ISD::FNEG, SL, VT, Trunc, Flags); in LowerFREM()
2372 SDValue Trunc = DAG.getNode(ISD::FTRUNC, SL, MVT::f64, Src); in LowerFCEIL() local
2381 SDValue NeTrunc = DAG.getSetCC(SL, SetCCVT, Src, Trunc, ISD::SETONE); in LowerFCEIL()
2386 return DAG.getNode(ISD::FADD, SL, MVT::f64, Trunc, Add); in LowerFCEIL()
2533 SDValue Trunc = DAG.getNode(ISD::FTRUNC, SL, MVT::f64, Src); in LowerFFLOOR() local
2542 SDValue NeTrunc = DAG.getSetCC(SL, SetCCVT, Src, Trunc, ISD::SETONE); in LowerFFLOOR()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DARMParallelDSP.cpp785 Value *Trunc = IRB.CreateTrunc(Top, OffsetTy); in CreateWideLoad() local
786 Value *NewOffsetSExt = IRB.CreateSExt(Trunc, OffsetSExt->getType()); in CreateWideLoad()
796 << *Trunc << "\n" in CreateWideLoad()
H A DMVELaneInterleavingPass.cpp178 case Instruction::Trunc: in tryInterleave()
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyFastISel.cpp981 const auto *Trunc = cast<TruncInst>(I); in selectTrunc() local
983 Register Reg = getRegForValue(Trunc->getOperand(0)); in selectTrunc()
987 if (Trunc->getOperand(0)->getType()->isIntegerTy(64)) { in selectTrunc()
995 updateValueMap(Trunc, Reg); in selectTrunc()
1410 case Instruction::Trunc: in fastSelectInstruction()
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DInterp.h211 SmallString<32> Trunc; in CheckDivRem() local
212 (-LHSInt.extend(LHSInt.getBitWidth() + 1)).toString(Trunc, 10); in CheckDivRem()
215 S.CCEDiag(Loc, diag::note_constexpr_overflow) << Trunc << E->getType(); in CheckDivRem()
351 SmallString<32> Trunc; in AddSubMulHelper() local
353 .toString(Trunc, 10, Result.isSigned(), /*formatAsCLiteral=*/false, in AddSubMulHelper()
357 << Trunc << Type << E->getSourceRange(); in AddSubMulHelper()
694 SmallString<32> Trunc; in Neg() local
696 .toString(Trunc, 10, Result.isSigned(), /*formatAsCLiteral=*/false, in Neg()
700 << Trunc << Type << E->getSourceRange(); in Neg()
757 SmallString<32> Trunc; in IncDecHelper() local
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DSpeculativeExecution.cpp248 case Instruction::Trunc: in ComputeSpeculationCost()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DOperator.cpp30 case Instruction::Trunc: { in hasPoisonGeneratingFlags()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DTypeMetadataUtils.cpp186 case Instruction::Trunc: in getPointerAtOffset()
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZTargetTransformInfo.cpp210 case Instruction::Trunc: in getIntImmCostInst()
830 if (Opcode == Instruction::Trunc && isInt128InVR(Src) && I != nullptr) { in getCastInstrCost()
857 if (Opcode == Instruction::Trunc) { in getCastInstrCost()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DNumericalStabilitySanitizer.cpp538 Value *handleTrunc(const FPTruncInst &Trunc, Type *VT, Type *ExtendedVT,
1136 Value *NumericalStabilitySanitizer::handleTrunc(const FPTruncInst &Trunc, in handleTrunc() argument
1140 Value *OrigSource = Trunc.getOperand(0); in handleTrunc()
1643 if (auto *Trunc = dyn_cast<FPTruncInst>(&Inst)) in createShadowValueWithOperandsAvailable() local
1644 return handleTrunc(*Trunc, VT, ExtendedVT, Map, Builder); in createShadowValueWithOperandsAvailable()

12345