/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
H A D | VPlanTransforms.cpp | 541 Type *TruncTy = TruncI->getType(); in createScalarIVSteps() local 542 assert(ResultTy->getScalarSizeInBits() > TruncTy->getScalarSizeInBits() && in createScalarIVSteps() 545 BaseIV = new VPScalarCastRecipe(Instruction::Trunc, BaseIV, TruncTy); in createScalarIVSteps() 547 ResultTy = TruncTy; in createScalarIVSteps() 1007 Type *TruncTy = TypeInfo.inferScalarType(Trunc); in simplifyRecipe() local 1009 if (TruncTy == ATy) { in simplifyRecipe() 1015 if (ATy->getScalarSizeInBits() < TruncTy->getScalarSizeInBits()) { in simplifyRecipe() 1021 new VPWidenCastRecipe(Instruction::CastOps(ExtOpcode), A, TruncTy); in simplifyRecipe() 1028 } else if (ATy->getScalarSizeInBits() > TruncTy->getScalarSizeInBits()) { in simplifyRecipe() 1029 auto *VPC = new VPWidenCastRecipe(Instruction::Trunc, A, TruncTy); in simplifyRecipe()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineInternal.h | 224 Constant *getLosslessTrunc(Constant *C, Type *TruncTy, unsigned ExtOp) { in getLosslessTrunc() argument 225 Constant *TruncC = ConstantExpr::getTrunc(C, TruncTy); in getLosslessTrunc() 233 Constant *getLosslessUnsignedTrunc(Constant *C, Type *TruncTy) { in getLosslessUnsignedTrunc() argument 234 return getLosslessTrunc(C, TruncTy, Instruction::ZExt); in getLosslessUnsignedTrunc() 237 Constant *getLosslessSignedTrunc(Constant *C, Type *TruncTy) { in getLosslessSignedTrunc() argument 238 return getLosslessTrunc(C, TruncTy, Instruction::SExt); in getLosslessSignedTrunc()
|
H A D | InstCombineCompares.cpp | 1542 Type *TruncTy = Cmp.getOperand(0)->getType(); in foldICmpTruncWithTruncOrExt() local 1543 unsigned TruncBits = TruncTy->getScalarSizeInBits(); in foldICmpTruncWithTruncOrExt() 2441 Type *TruncTy = ShType->getWithNewBitWidth(TypeBits - Amt); in foldICmpShlConstant() local 2443 ConstantInt::get(TruncTy, RHSC.ashr(*ShiftAmt).trunc(TypeBits - Amt)); in foldICmpShlConstant() 2445 Builder.CreateTrunc(X, TruncTy, "", /*IsNUW=*/false, in foldICmpShlConstant()
|
H A D | InstCombineAndOrXor.cpp | 1139 Type *TruncTy = V->getType()->getWithNewBitWidth(P.NumBits); in extractIntPart() local 1140 if (TruncTy != V->getType()) in extractIntPart() 1141 V = Builder.CreateTrunc(V, TruncTy); in extractIntPart()
|
/freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
H A D | CGStmt.cpp | 2549 llvm::Type *TruncTy = ResultTruncRegTypes[i]; in EmitAsmStores() local 2563 if (ResultRegTypes[i] != TruncTy) { in EmitAsmStores() 2567 if (TruncTy->isFloatingPointTy()) in EmitAsmStores() 2568 Tmp = Builder.CreateFPTrunc(Tmp, TruncTy); in EmitAsmStores() 2569 else if (TruncTy->isPointerTy() && Tmp->getType()->isIntegerTy()) { in EmitAsmStores() 2570 uint64_t ResSize = CGM.getDataLayout().getTypeSizeInBits(TruncTy); in EmitAsmStores() 2573 Tmp = Builder.CreateIntToPtr(Tmp, TruncTy); in EmitAsmStores() 2574 } else if (Tmp->getType()->isPointerTy() && TruncTy->isIntegerTy()) { in EmitAsmStores() 2579 Tmp = Builder.CreateTrunc(Tmp, TruncTy); in EmitAsmStores() 2580 } else if (Tmp->getType()->isIntegerTy() && TruncTy->isIntegerTy()) { in EmitAsmStores() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | CorrelatedValuePropagation.cpp | 776 auto *TruncTy = Instr->getType()->getWithNewBitWidth(NewWidth); in narrowSDivOrSRem() local 777 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowSDivOrSRem() 779 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowSDivOrSRem() 896 auto *TruncTy = Instr->getType()->getWithNewBitWidth(NewWidth); in narrowUDivOrURem() local 897 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowUDivOrURem() 899 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowUDivOrURem()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | ScalarEvolutionExpander.cpp | 935 const Loop *L, Type *&TruncTy, in getAddRecExprPHILiterally() argument 945 TruncTy = nullptr; in getAddRecExprPHILiterally() 995 TruncTy = nullptr; in getAddRecExprPHILiterally() 1003 if ((!TruncTy || InvertStep) && in getAddRecExprPHILiterally() 1009 TruncTy = Normalized->getType(); in getAddRecExprPHILiterally() 1133 Type *TruncTy = nullptr; in expandAddRecExprLiterally() local 1135 PHINode *PN = getAddRecExprPHILiterally(Normalized, L, TruncTy, InvertStep); in expandAddRecExprLiterally() 1189 if (TruncTy) { in expandAddRecExprLiterally() 1191 if (TruncTy != Result->getType()) in expandAddRecExprLiterally() 1192 Result = Builder.CreateTrunc(Result, TruncTy); in expandAddRecExprLiterally()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | TypePromotion.cpp | 528 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 D | CodeGenPrepare.cpp | 6935 Type *TruncTy = Type::getIntNTy(Ctx, ActiveBits); in optimizeLoadExt() local 6936 EVT TruncVT = TLI->getValueType(*DL, TruncTy); in optimizeLoadExt()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | ScalarEvolutionExpander.h | 520 const Loop *L, Type *&TruncTy,
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonISelLowering.cpp | 3486 EVT TruncTy = Op.getValueType(); in PerformDAGCombine() local 3489 if (Elem0.getValueType() == TruncTy) in PerformDAGCombine() 3492 if (Elem0.getValueType().bitsGT(TruncTy)) in PerformDAGCombine() 3493 return DCI.DAG.getNode(ISD::TRUNCATE, dl, TruncTy, Elem0); in PerformDAGCombine() 3527 MVT TruncTy = ty(Op); in PerformDAGCombine() local 3530 if (ty(Elem0) == TruncTy) in PerformDAGCombine() 3533 if (ty(Elem0).bitsGT(TruncTy)) in PerformDAGCombine() 3534 return DCI.DAG.getNode(ISD::TRUNCATE, dl, TruncTy, Elem0); in PerformDAGCombine()
|
H A D | HexagonLoopIdiomRecognition.cpp | 1048 IntegerType *TruncTy = cast<IntegerType>(OrigTy); in promoteTo() local 1049 Value *Mask = ConstantInt::get(DestTy, (1u << TruncTy->getBitWidth()) - 1); in promoteTo()
|
H A D | HexagonISelLoweringHVX.cpp | 3496 EVT TruncTy = Op.getValueType(); in combineTruncateBeforeLegal() local 3501 if (SrcTy.getVectorElementType() != TruncTy.getVectorElementType()) in combineTruncateBeforeLegal()
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | ScalarEvolution.cpp | 3408 Type *TruncTy = in getURemExpr() local 3410 return getZeroExtendExpr(getTruncateExpr(LHS, TruncTy), FullTy); in getURemExpr() 5519 Type *TruncTy = nullptr; in createAddRecFromPHIWithCastsImpl() local 5522 if ((TruncTy = in createAddRecFromPHIWithCastsImpl() 5597 getAddRecExpr(getTruncateExpr(StartVal, TruncTy), in createAddRecFromPHIWithCastsImpl() 5598 getTruncateExpr(Accum, TruncTy), L, SCEV::FlagAnyWrap); in createAddRecFromPHIWithCastsImpl() 5626 const SCEV *TruncatedExpr = getTruncateExpr(Expr, TruncTy); in createAddRecFromPHIWithCastsImpl() 7943 Type *TruncTy = IntegerType::get(getContext(), BitWidth - AShrAmt); in createSCEV() local 7970 AddTruncateExpr = getTruncateExpr(ShlOp0SCEV, TruncTy); in createSCEV() 7980 AddTruncateExpr = getTruncateExpr(ShlOp0SCEV, TruncTy); in createSCEV()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | CombinerHelper.cpp | 2619 static LLT getMidVTForTruncRightShiftCombine(LLT ShiftTy, LLT TruncTy) { in getMidVTForTruncRightShiftCombine() argument 2621 const unsigned TruncSize = TruncTy.getScalarSizeInBits(); in getMidVTForTruncRightShiftCombine()
|
/freebsd/contrib/llvm-project/clang/lib/Sema/ |
H A D | SemaExprCXX.cpp | 4835 QualType TruncTy = in PerformImplicitConversion() local 4837 From = ImpCastExprToType(From, TruncTy, CK_HLSLVectorTruncation, in PerformImplicitConversion()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64InstrInfo.td | 6527 class concat_trunc_to_uzp1_pat<ValueType SrcTy, ValueType TruncTy, ValueType ConcatTy> 6528 : Pat<(ConcatTy (concat_vectors (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vn))), 6529 (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vm))))), 6538 class trunc_concat_trunc_to_xtn_uzp1_pat<ValueType SrcTy, ValueType TruncTy, ValueType ConcatTy, 6542 (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vn))), 6543 (TruncTy (trunc_optional_assert_ext (SrcTy V128:$Vm))))))),
|