Home
last modified time | relevance | path

Searched refs:TruncTy (Results 1 – 17 of 17) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineInternal.h225 Constant *getLosslessTrunc(Constant *C, Type *TruncTy, unsigned ExtOp) { in getLosslessTrunc() argument
226 Constant *TruncC = ConstantExpr::getTrunc(C, TruncTy); in getLosslessTrunc()
234 Constant *getLosslessUnsignedTrunc(Constant *C, Type *TruncTy) { in getLosslessUnsignedTrunc() argument
235 return getLosslessTrunc(C, TruncTy, Instruction::ZExt); in getLosslessUnsignedTrunc()
238 Constant *getLosslessSignedTrunc(Constant *C, Type *TruncTy) { in getLosslessSignedTrunc() argument
239 return getLosslessTrunc(C, TruncTy, Instruction::SExt); in getLosslessSignedTrunc()
H A DInstCombineCompares.cpp1578 Type *TruncTy = Cmp.getOperand(0)->getType(); in foldICmpTruncWithTruncOrExt() local
1579 unsigned TruncBits = TruncTy->getScalarSizeInBits(); in foldICmpTruncWithTruncOrExt()
2491 Type *TruncTy = ShType->getWithNewBitWidth(TypeBits - Amt); in foldICmpShlConstant() local
2493 ConstantInt::get(TruncTy, RHSC.ashr(*ShiftAmt).trunc(TypeBits - Amt)); in foldICmpShlConstant()
2495 Builder.CreateTrunc(X, TruncTy, "", /*IsNUW=*/false, in foldICmpShlConstant()
H A DInstCombineAndOrXor.cpp1174 Type *TruncTy = V->getType()->getWithNewBitWidth(P.NumBits); in extractIntPart() local
1175 if (TruncTy != V->getType()) in extractIntPart()
1176 V = Builder.CreateTrunc(V, TruncTy); in extractIntPart()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGStmt.cpp2722 llvm::Type *TruncTy = ResultTruncRegTypes[i]; in EmitAsmStores() local
2736 if (ResultRegTypes[i] != TruncTy) { in EmitAsmStores()
2740 if (TruncTy->isFloatingPointTy()) in EmitAsmStores()
2741 Tmp = Builder.CreateFPTrunc(Tmp, TruncTy); in EmitAsmStores()
2742 else if (TruncTy->isPointerTy() && Tmp->getType()->isIntegerTy()) { in EmitAsmStores()
2743 uint64_t ResSize = CGM.getDataLayout().getTypeSizeInBits(TruncTy); in EmitAsmStores()
2746 Tmp = Builder.CreateIntToPtr(Tmp, TruncTy); in EmitAsmStores()
2747 } else if (Tmp->getType()->isPointerTy() && TruncTy->isIntegerTy()) { in EmitAsmStores()
2752 Tmp = Builder.CreateTrunc(Tmp, TruncTy); in EmitAsmStores()
2753 } else if (Tmp->getType()->isIntegerTy() && TruncTy->isIntegerTy()) { in EmitAsmStores()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp959 const Loop *L, Type *&TruncTy, in getAddRecExprPHILiterally() argument
969 TruncTy = nullptr; in getAddRecExprPHILiterally()
1019 TruncTy = nullptr; in getAddRecExprPHILiterally()
1027 if ((!TruncTy || InvertStep) && in getAddRecExprPHILiterally()
1033 TruncTy = Normalized->getType(); in getAddRecExprPHILiterally()
1157 Type *TruncTy = nullptr; in expandAddRecExprLiterally() local
1159 PHINode *PN = getAddRecExprPHILiterally(Normalized, L, TruncTy, InvertStep); in expandAddRecExprLiterally()
1213 if (TruncTy) { in expandAddRecExprLiterally()
1215 if (TruncTy != Result->getType()) in expandAddRecExprLiterally()
1216 Result = Builder.CreateTrunc(Result, TruncTy); in expandAddRecExprLiterally()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DCorrelatedValuePropagation.cpp798 auto *TruncTy = Instr->getType()->getWithNewBitWidth(NewWidth); in narrowSDivOrSRem() local
799 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowSDivOrSRem()
801 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowSDivOrSRem()
916 auto *TruncTy = Instr->getType()->getWithNewBitWidth(NewWidth); in narrowUDivOrURem() local
917 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowUDivOrURem()
919 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowUDivOrURem()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DTypePromotion.cpp528 auto InsertTrunc = [&](Value *V, Type *TruncTy) -> Instruction * { in TruncateSinks() argument
535 LLVM_DEBUG(dbgs() << "IR Promotion: Creating " << *TruncTy << " Trunc for " in TruncateSinks()
538 auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy)); in TruncateSinks()
H A DCodeGenPrepare.cpp7327 Type *TruncTy = Type::getIntNTy(Ctx, ActiveBits); in optimizeLoadExt() local
7328 EVT TruncVT = TLI->getValueType(*DL, TruncTy); in optimizeLoadExt()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlanTransforms.cpp579 Type *TruncTy = TruncI->getType(); in createScalarIVSteps() local
580 assert(ResultTy->getScalarSizeInBits() > TruncTy->getScalarSizeInBits() && in createScalarIVSteps()
583 BaseIV = Builder.createScalarCast(Instruction::Trunc, BaseIV, TruncTy, DL); in createScalarIVSteps()
584 ResultTy = TruncTy; in createScalarIVSteps()
1021 Type *TruncTy = TypeInfo.inferScalarType(Def); in simplifyRecipe() local
1023 if (TruncTy == ATy) { in simplifyRecipe()
1029 if (ATy->getScalarSizeInBits() < TruncTy->getScalarSizeInBits()) { in simplifyRecipe()
1035 new VPWidenCastRecipe(Instruction::CastOps(ExtOpcode), A, TruncTy); in simplifyRecipe()
1042 } else if (ATy->getScalarSizeInBits() > TruncTy->getScalarSizeInBits()) { in simplifyRecipe()
1043 auto *VPC = new VPWidenCastRecipe(Instruction::Trunc, A, TruncTy); in simplifyRecipe()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DScalarEvolutionExpander.h535 const Loop *L, Type *&TruncTy,
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonISelLowering.cpp3508 EVT TruncTy = Op.getValueType(); in PerformDAGCombine() local
3511 if (Elem0.getValueType() == TruncTy) in PerformDAGCombine()
3514 if (Elem0.getValueType().bitsGT(TruncTy)) in PerformDAGCombine()
3515 return DCI.DAG.getNode(ISD::TRUNCATE, dl, TruncTy, Elem0); in PerformDAGCombine()
3549 MVT TruncTy = ty(Op); in PerformDAGCombine() local
3552 if (ty(Elem0) == TruncTy) in PerformDAGCombine()
3555 if (ty(Elem0).bitsGT(TruncTy)) in PerformDAGCombine()
3556 return DCI.DAG.getNode(ISD::TRUNCATE, dl, TruncTy, Elem0); in PerformDAGCombine()
H A DHexagonLoopIdiomRecognition.cpp1038 IntegerType *TruncTy = cast<IntegerType>(OrigTy); in promoteTo() local
1039 Value *Mask = ConstantInt::get(DestTy, (1u << TruncTy->getBitWidth()) - 1); in promoteTo()
H A DHexagonISelLoweringHVX.cpp3533 EVT TruncTy = Op.getValueType(); in combineTruncateBeforeLegal() local
3538 if (SrcTy.getVectorElementType() != TruncTy.getVectorElementType()) in combineTruncateBeforeLegal()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DScalarEvolution.cpp3375 Type *TruncTy = in getURemExpr() local
3377 return getZeroExtendExpr(getTruncateExpr(LHS, TruncTy), FullTy); in getURemExpr()
5485 Type *TruncTy = nullptr; in createAddRecFromPHIWithCastsImpl() local
5488 if ((TruncTy = in createAddRecFromPHIWithCastsImpl()
5563 getAddRecExpr(getTruncateExpr(StartVal, TruncTy), in createAddRecFromPHIWithCastsImpl()
5564 getTruncateExpr(Accum, TruncTy), L, SCEV::FlagAnyWrap); in createAddRecFromPHIWithCastsImpl()
5592 const SCEV *TruncatedExpr = getTruncateExpr(Expr, TruncTy); in createAddRecFromPHIWithCastsImpl()
7960 Type *TruncTy = IntegerType::get(getContext(), BitWidth - AShrAmt); in createSCEV() local
7987 AddTruncateExpr = getTruncateExpr(ShlOp0SCEV, TruncTy); in createSCEV()
7997 AddTruncateExpr = getTruncateExpr(ShlOp0SCEV, TruncTy); in createSCEV()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaExprCXX.cpp5204 QualType TruncTy = FromVec->getElementType(); in PerformImplicitConversion() local
5206 TruncTy = Context.getExtVectorType(TruncTy, ToVec->getNumElements()); in PerformImplicitConversion()
5207 From = ImpCastExprToType(From, TruncTy, CK_HLSLVectorTruncation, in PerformImplicitConversion()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DCombinerHelper.cpp2639 static LLT getMidVTForTruncRightShiftCombine(LLT ShiftTy, LLT TruncTy) { in getMidVTForTruncRightShiftCombine() argument
2641 const unsigned TruncSize = TruncTy.getScalarSizeInBits(); in getMidVTForTruncRightShiftCombine()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64InstrInfo.td6967 class concat_trunc_to_uzp1_pat<ValueType SrcTy, ValueType TruncTy, ValueType ConcatTy>
6968 : Pat<(ConcatTy (concat_vectors (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vn))),
6969 (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vm))))),
6978 class trunc_concat_trunc_to_xtn_uzp1_pat<ValueType SrcTy, ValueType TruncTy, ValueType ConcatTy,
6982 (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vn))),
6983 (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vm))))))),