| /llvm-project-15.0.7/llvm/unittests/IR/ |
| H A D | VectorTypesTest.cpp | 102 auto *TruncTy = dyn_cast<FixedVectorType>( in TEST() local 104 EXPECT_VTY_EQ(TruncTy, V8Int16Ty); in TEST() 105 EXPECT_EQ(TruncTy->getNumElements(), 8U); in TEST() 106 EXPECT_EQ(TruncTy->getElementType()->getScalarSizeInBits(), 16U); in TEST() 197 auto *TruncTy = dyn_cast<ScalableVectorType>( in TEST() local 199 EXPECT_VTY_EQ(TruncTy, ScV8Int16Ty); in TEST() 200 EXPECT_EQ(TruncTy->getMinNumElements(), 8U); in TEST() 201 EXPECT_EQ(TruncTy->getElementType()->getScalarSizeInBits(), 16U); in TEST()
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | CGStmt.cpp | 2742 llvm::Type *TruncTy = ResultTruncRegTypes[i]; in EmitAsmStmt() local 2760 if (TruncTy->isFloatingPointTy()) in EmitAsmStmt() 2761 Tmp = Builder.CreateFPTrunc(Tmp, TruncTy); in EmitAsmStmt() 2762 else if (TruncTy->isPointerTy() && Tmp->getType()->isIntegerTy()) { in EmitAsmStmt() 2766 Tmp = Builder.CreateIntToPtr(Tmp, TruncTy); in EmitAsmStmt() 2771 Tmp = Builder.CreateTrunc(Tmp, TruncTy); in EmitAsmStmt() 2772 } else if (TruncTy->isIntegerTy()) { in EmitAsmStmt() 2773 Tmp = Builder.CreateZExtOrTrunc(Tmp, TruncTy); in EmitAsmStmt() 2774 } else if (TruncTy->isVectorTy()) { in EmitAsmStmt() 2775 Tmp = Builder.CreateBitCast(Tmp, TruncTy); in EmitAsmStmt() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | CorrelatedValuePropagation.cpp | 757 auto *TruncTy = Type::getIntNTy(Instr->getContext(), NewWidth); in narrowSDivOrSRem() local 758 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in narrowSDivOrSRem() 760 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in narrowSDivOrSRem() 801 auto *TruncTy = Type::getIntNTy(Instr->getContext(), NewWidth); in processUDivOrURem() local 802 auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy, in processUDivOrURem() 804 auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy, in processUDivOrURem()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | ScalarEvolutionExpander.cpp | 1173 Type *&TruncTy, in getAddRecExprPHILiterally() argument 1182 TruncTy = nullptr; in getAddRecExprPHILiterally() 1232 TruncTy = nullptr; in getAddRecExprPHILiterally() 1240 if ((!TruncTy || InvertStep) && in getAddRecExprPHILiterally() 1246 TruncTy = SE.getEffectiveSCEVType(Normalized->getType()); in getAddRecExprPHILiterally() 1408 Type *TruncTy = nullptr; in expandAddRecExprLiterally() local 1411 IntTy, TruncTy, InvertStep); in expandAddRecExprLiterally() 1466 if (TruncTy) { in expandAddRecExprLiterally() 1472 if (TruncTy != Result->getType()) in expandAddRecExprLiterally() 1473 Result = Builder.CreateTrunc(Result, TruncTy); in expandAddRecExprLiterally() [all …]
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | TypePromotion.cpp | 509 auto InsertTrunc = [&](Value *V, Type *TruncTy) -> Instruction * { in TruncateSinks() argument 516 LLVM_DEBUG(dbgs() << "IR Promotion: Creating " << *TruncTy << " Trunc for " in TruncateSinks() 519 auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy)); in TruncateSinks()
|
| H A D | CodeGenPrepare.cpp | 6562 Type *TruncTy = Type::getIntNTy(Ctx, ActiveBits); in optimizeLoadExt() local 6563 EVT TruncVT = TLI->getValueType(*DL, TruncTy); in optimizeLoadExt()
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/ |
| H A D | ScalarEvolutionExpander.h | 490 Type *&TruncTy, bool &InvertStep);
|
| /llvm-project-15.0.7/llvm/lib/Target/Hexagon/ |
| 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()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | ScalarEvolution.cpp | 3334 Type *TruncTy = in getURemExpr() local 3336 return getZeroExtendExpr(getTruncateExpr(LHS, TruncTy), FullTy); in getURemExpr() 5325 Type *TruncTy = nullptr; in createAddRecFromPHIWithCastsImpl() local 5328 if ((TruncTy = in createAddRecFromPHIWithCastsImpl() 5403 getAddRecExpr(getTruncateExpr(StartVal, TruncTy), in createAddRecFromPHIWithCastsImpl() 5404 getTruncateExpr(Accum, TruncTy), L, SCEV::FlagAnyWrap); in createAddRecFromPHIWithCastsImpl() 5432 const SCEV *TruncatedExpr = getTruncateExpr(Expr, TruncTy); in createAddRecFromPHIWithCastsImpl() 7718 Type *TruncTy = IntegerType::get(getContext(), BitWidth - AShrAmt); in createSCEV() local 7731 getTruncateExpr(ShlOp0SCEV, TruncTy), OuterTy); in createSCEV() 7744 getMulExpr(getTruncateExpr(ShlOp0SCEV, TruncTy), in createSCEV()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineAndOrXor.cpp | 1041 Type *TruncTy = V->getType()->getWithNewBitWidth(P.NumBits); in extractIntPart() local 1042 if (TruncTy != V->getType()) in extractIntPart() 1043 V = Builder.CreateTrunc(V, TruncTy); in extractIntPart()
|
| H A D | InstCombineCompares.cpp | 2248 Type *TruncTy = IntegerType::get(Cmp.getContext(), TypeBits - Amt); in foldICmpShlConstant() local 2250 TruncTy = VectorType::get(TruncTy, ShVTy->getElementCount()); in foldICmpShlConstant() 2252 ConstantInt::get(TruncTy, C.ashr(*ShiftAmt).trunc(TypeBits - Amt)); in foldICmpShlConstant() 2253 return new ICmpInst(Pred, Builder.CreateTrunc(X, TruncTy), NewC); in foldICmpShlConstant()
|