| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
| H A D | VPlanTransforms.cpp | 499 Type *TruncTy = TruncI ? TruncI->getType() : IVTy; in createScalarIVSteps() local 501 if (!CanonicalIV->isCanonical(ID.getKind(), StartV, Step, TruncTy)) { in createScalarIVSteps() 827 Type *TruncTy = TypeInfo.inferScalarType(Trunc); in simplifyRecipe() local 829 if (TruncTy == ATy) { in simplifyRecipe() 835 if (ATy->getScalarSizeInBits() < TruncTy->getScalarSizeInBits()) { in simplifyRecipe() 837 new VPWidenCastRecipe(Instruction::CastOps(ExtOpcode), A, TruncTy); in simplifyRecipe() 840 } else if (ATy->getScalarSizeInBits() > TruncTy->getScalarSizeInBits()) { in simplifyRecipe() 841 auto *VPC = new VPWidenCastRecipe(Instruction::Trunc, A, TruncTy); in simplifyRecipe()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineInternal.h | 222 Constant *getLosslessTrunc(Constant *C, Type *TruncTy, unsigned ExtOp) { in getLosslessTrunc() argument 223 Constant *TruncC = ConstantExpr::getTrunc(C, TruncTy); in getLosslessTrunc() 231 Constant *getLosslessUnsignedTrunc(Constant *C, Type *TruncTy) { in getLosslessUnsignedTrunc() argument 232 return getLosslessTrunc(C, TruncTy, Instruction::ZExt); in getLosslessUnsignedTrunc() 235 Constant *getLosslessSignedTrunc(Constant *C, Type *TruncTy) { in getLosslessSignedTrunc() argument 236 return getLosslessTrunc(C, TruncTy, Instruction::SExt); in getLosslessSignedTrunc()
|
| H A D | InstCombineCompares.cpp | 1513 Type *TruncTy = Cmp.getOperand(0)->getType(); in foldICmpTruncWithTruncOrExt() local 1514 unsigned TruncBits = TruncTy->getScalarSizeInBits(); in foldICmpTruncWithTruncOrExt() 2362 Type *TruncTy = IntegerType::get(Cmp.getContext(), TypeBits - Amt); in foldICmpShlConstant() local 2364 TruncTy = VectorType::get(TruncTy, ShVTy->getElementCount()); in foldICmpShlConstant() 2366 ConstantInt::get(TruncTy, C.ashr(*ShiftAmt).trunc(TypeBits - Amt)); in foldICmpShlConstant() 2367 return new ICmpInst(Pred, Builder.CreateTrunc(X, TruncTy), NewC); in foldICmpShlConstant()
|
| H A D | InstCombineAndOrXor.cpp | 1096 Type *TruncTy = V->getType()->getWithNewBitWidth(P.NumBits); in extractIntPart() local 1097 if (TruncTy != V->getType()) in extractIntPart() 1098 V = Builder.CreateTrunc(V, TruncTy); in extractIntPart()
|
| /freebsd-14.2/contrib/llvm-project/clang/lib/CodeGen/ |
| H A D | CGStmt.cpp | 2371 llvm::Type *TruncTy = ResultTruncRegTypes[i]; in EmitAsmStores() local 2385 if (ResultRegTypes[i] != TruncTy) { in EmitAsmStores() 2389 if (TruncTy->isFloatingPointTy()) in EmitAsmStores() 2390 Tmp = Builder.CreateFPTrunc(Tmp, TruncTy); in EmitAsmStores() 2391 else if (TruncTy->isPointerTy() && Tmp->getType()->isIntegerTy()) { in EmitAsmStores() 2395 Tmp = Builder.CreateIntToPtr(Tmp, TruncTy); in EmitAsmStores() 2401 Tmp = Builder.CreateTrunc(Tmp, TruncTy); in EmitAsmStores() 2403 Tmp = Builder.CreateZExtOrTrunc(Tmp, TruncTy); in EmitAsmStores() 2404 } else if (Tmp->getType()->isVectorTy() || TruncTy->isVectorTy()) { in EmitAsmStores() 2405 Tmp = Builder.CreateBitCast(Tmp, TruncTy); in EmitAsmStores() [all …]
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | CorrelatedValuePropagation.cpp | 712 auto *TruncTy = Type::getIntNTy(Instr->getContext(), NewWidth); in narrowSDivOrSRem() local 713 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowSDivOrSRem() 715 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowSDivOrSRem() 831 auto *TruncTy = Type::getIntNTy(Instr->getContext(), NewWidth); in narrowUDivOrURem() local 832 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowUDivOrURem() 834 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowUDivOrURem()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | ScalarEvolutionExpander.cpp | 875 const Loop *L, Type *&TruncTy, in getAddRecExprPHILiterally() argument 885 TruncTy = nullptr; in getAddRecExprPHILiterally() 935 TruncTy = nullptr; in getAddRecExprPHILiterally() 943 if ((!TruncTy || InvertStep) && in getAddRecExprPHILiterally() 949 TruncTy = Normalized->getType(); in getAddRecExprPHILiterally() 1076 Type *TruncTy = nullptr; in expandAddRecExprLiterally() local 1078 PHINode *PN = getAddRecExprPHILiterally(Normalized, L, TruncTy, InvertStep); in expandAddRecExprLiterally() 1132 if (TruncTy) { in expandAddRecExprLiterally() 1134 if (TruncTy != Result->getType()) in expandAddRecExprLiterally() 1135 Result = Builder.CreateTrunc(Result, TruncTy); in expandAddRecExprLiterally()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | TypePromotion.cpp | 520 auto InsertTrunc = [&](Value *V, Type *TruncTy) -> Instruction * { in TruncateSinks() argument 527 LLVM_DEBUG(dbgs() << "IR Promotion: Creating " << *TruncTy << " Trunc for " in TruncateSinks() 530 auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy)); in TruncateSinks()
|
| H A D | CodeGenPrepare.cpp | 6821 Type *TruncTy = Type::getIntNTy(Ctx, ActiveBits); in optimizeLoadExt() local 6822 EVT TruncVT = TLI->getValueType(*DL, TruncTy); in optimizeLoadExt()
|
| /freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
| H A D | ScalarEvolutionExpander.h | 492 const Loop *L, Type *&TruncTy,
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonISelLowering.cpp | 3465 EVT TruncTy = Op.getValueType(); in PerformDAGCombine() local 3468 if (Elem0.getValueType() == TruncTy) in PerformDAGCombine() 3471 if (Elem0.getValueType().bitsGT(TruncTy)) in PerformDAGCombine() 3472 return DCI.DAG.getNode(ISD::TRUNCATE, dl, TruncTy, Elem0); in PerformDAGCombine() 3506 MVT TruncTy = ty(Op); in PerformDAGCombine() local 3509 if (ty(Elem0) == TruncTy) in PerformDAGCombine() 3512 if (ty(Elem0).bitsGT(TruncTy)) in PerformDAGCombine() 3513 return DCI.DAG.getNode(ISD::TRUNCATE, dl, TruncTy, Elem0); in PerformDAGCombine()
|
| H A D | HexagonLoopIdiomRecognition.cpp | 1054 IntegerType *TruncTy = cast<IntegerType>(OrigTy); in promoteTo() local 1055 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-14.2/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | ScalarEvolution.cpp | 3406 Type *TruncTy = in getURemExpr() local 3408 return getZeroExtendExpr(getTruncateExpr(LHS, TruncTy), FullTy); in getURemExpr() 5514 Type *TruncTy = nullptr; in createAddRecFromPHIWithCastsImpl() local 5517 if ((TruncTy = in createAddRecFromPHIWithCastsImpl() 5592 getAddRecExpr(getTruncateExpr(StartVal, TruncTy), in createAddRecFromPHIWithCastsImpl() 5593 getTruncateExpr(Accum, TruncTy), L, SCEV::FlagAnyWrap); in createAddRecFromPHIWithCastsImpl() 5621 const SCEV *TruncatedExpr = getTruncateExpr(Expr, TruncTy); in createAddRecFromPHIWithCastsImpl() 7927 Type *TruncTy = IntegerType::get(getContext(), BitWidth - AShrAmt); in createSCEV() local 7954 AddTruncateExpr = getTruncateExpr(ShlOp0SCEV, TruncTy); in createSCEV() 7964 AddTruncateExpr = getTruncateExpr(ShlOp0SCEV, TruncTy); in createSCEV()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
| H A D | CombinerHelper.cpp | 2489 static LLT getMidVTForTruncRightShiftCombine(LLT ShiftTy, LLT TruncTy) { in getMidVTForTruncRightShiftCombine() argument 2491 const unsigned TruncSize = TruncTy.getScalarSizeInBits(); in getMidVTForTruncRightShiftCombine()
|