Home | History | Annotate | Download | only in Analysis

Lines Matching refs:cast

140     cast<SCEVConstant>(this)->getValue()->printAsOperand(OS, false);
143 const SCEVTruncateExpr *Trunc = cast<SCEVTruncateExpr>(this);
150 const SCEVZeroExtendExpr *ZExt = cast<SCEVZeroExtendExpr>(this);
157 const SCEVSignExtendExpr *SExt = cast<SCEVSignExtendExpr>(this);
164 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(this);
184 const SCEVNAryExpr *NAry = cast<SCEVNAryExpr>(this);
211 const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(this);
216 const SCEVUnknown *U = cast<SCEVUnknown>(this);
250 return cast<SCEVConstant>(this)->getType();
254 return cast<SCEVCastExpr>(this)->getType();
259 return cast<SCEVNAryExpr>(this)->getType();
261 return cast<SCEVAddExpr>(this)->getType();
263 return cast<SCEVUDivExpr>(this)->getType();
265 return cast<SCEVUnknown>(this)->getType();
326 IntegerType *ITy = cast<IntegerType>(getEffectiveSCEVType(Ty));
391 AllocTy = cast<PointerType>(CE->getOperand(0)->getType())
406 cast<PointerType>(CE->getOperand(0)->getType())->getElementType();
433 cast<PointerType>(CE->getOperand(0)->getType())->getElementType();
482 const SCEVUnknown *LU = cast<SCEVUnknown>(LHS);
483 const SCEVUnknown *RU = cast<SCEVUnknown>(RHS);
504 const Argument *RA = cast<Argument>(RV);
512 const Instruction *RInst = cast<Instruction>(RV);
534 const SCEVConstant *LC = cast<SCEVConstant>(LHS);
535 const SCEVConstant *RC = cast<SCEVConstant>(RHS);
547 const SCEVAddRecExpr *LA = cast<SCEVAddRecExpr>(LHS);
548 const SCEVAddRecExpr *RA = cast<SCEVAddRecExpr>(RHS);
578 const SCEVNAryExpr *LC = cast<SCEVNAryExpr>(LHS);
579 const SCEVNAryExpr *RC = cast<SCEVNAryExpr>(RHS);
597 const SCEVUDivExpr *LC = cast<SCEVUDivExpr>(LHS);
598 const SCEVUDivExpr *RC = cast<SCEVUDivExpr>(RHS);
610 const SCEVCastExpr *LC = cast<SCEVCastExpr>(LHS);
611 const SCEVCastExpr *RC = cast<SCEVCastExpr>(RHS);
613 // Compare cast expressions by operand.
872 RewriteMap[cast<SCEVUnknown>(Denominator)->getValue()] =
873 cast<SCEVConstant>(Zero)->getValue();
878 RewriteMap[cast<SCEVUnknown>(Denominator)->getValue()] =
879 cast<SCEVConstant>(One)->getValue();
1085 cast<ConstantInt>(ConstantExpr::getTrunc(SC->getValue(), Ty)));
1139 // The cast wasn't folded; create an explicit cast node. We can reuse
1415 cast<ConstantInt>(ConstantExpr::getZExt(SC->getValue(), Ty)));
1591 // The cast wasn't folded; create an explicit cast node.
1611 cast<ConstantInt>(ConstantExpr::getSExt(SC->getValue(), Ty)));
1818 // The cast wasn't folded; create an explicit cast node.
1843 // Peel off a truncate cast.
1851 // Next try a zext cast. If the cast is folded, use it.
1856 // Next try a sext cast. If the cast is folded, use it.
1861 // Force the cast to be folded into the operands of an addrec.
1869 // If the expression is obviously signed, use the sext cast value.
1873 // Absent any other information, use the zext cast value.
1926 Scale * cast<SCEVConstant>(Mul->getOperand(0))->getAPInt();
1929 const SCEVAddExpr *Add = cast<SCEVAddExpr>(Mul->getOperand(1));
2003 const APInt &C = cast<SCEVConstant>(Ops[0])->getAPInt();
2050 LHSC = cast<SCEVConstant>(Ops[0]);
2091 const SCEVTruncateExpr *Trunc = cast<SCEVTruncateExpr>(Ops[Idx]);
2140 // Skip past any other cast SCEVs.
2208 const SCEVMulExpr *Mul = cast<SCEVMulExpr>(Ops[Idx]);
2244 const SCEVMulExpr *OtherMul = cast<SCEVMulExpr>(Ops[OtherMulIdx]);
2288 const SCEVAddRecExpr *AddRec = cast<SCEVAddRecExpr>(Ops[Idx]);
2333 if (AddRecLoop == cast<SCEVAddRecExpr>(Ops[OtherIdx])->getLoop()) {
2425 const auto *CurrentNAry = cast<SCEVNAryExpr>(CurrentExpr);
2473 LHSC = cast<SCEVConstant>(Ops[0]);
2477 if (cast<SCEVConstant>(Ops[0])->getValue()->equalsInt(1)) {
2480 } else if (cast<SCEVConstant>(Ops[0])->getValue()->isZero()) {
2546 const SCEVAddRecExpr *AddRec = cast<SCEVAddRecExpr>(Ops[Idx]);
2772 return getConstant(cast<ConstantInt>(ConstantExpr::getUDiv(LHSCV,
2834 cast<SCEVConstant>(getConstant(LHSCst->getAPInt().udiv(Factor)));
2836 cast<SCEVConstant>(getConstant(RHSCst->getAPInt().udiv(Factor)));
2994 ConstantInt *Index = cast<SCEVConstant>(IndexExpr)->getValue();
3005 CurTy = cast<SequentialType>(CurTy)->getElementType();
3055 LHSC = cast<SCEVConstant>(Ops[0]);
3059 if (cast<SCEVConstant>(Ops[0])->getValue()->isMinValue(true)) {
3062 } else if (cast<SCEVConstant>(Ops[0])->getValue()->isMaxValue(true)) {
3156 LHSC = cast<SCEVConstant>(Ops[0]);
3160 if (cast<SCEVConstant>(Ops[0])->getValue()->isMinValue(false)) {
3163 } else if (cast<SCEVConstant>(Ops[0])->getValue()->isMaxValue(false)) {
3265 assert(cast<SCEVUnknown>(S)->getValue() == V &&
3271 FirstUnknown = cast<SCEVUnknown>(S);
3328 if (!cast<SCEVUnknown>(S)->getValue())
3451 cast<ConstantInt>(ConstantExpr::getNeg(VC->getValue())));
3456 V, getConstant(cast<ConstantInt>(Constant::getAllOnesValue(Ty))), Flags);
3463 cast<ConstantInt>(ConstantExpr::getNot(VC->getValue())));
3468 getConstant(cast<ConstantInt>(Constant::getAllOnesValue(Ty)));
3620 if (const SCEVCastExpr *Cast = dyn_cast<SCEVCastExpr>(V)) {
3621 return getPointerBase(Cast->getOperand());
3645 Worklist.push_back(cast<Instruction>(U));
3849 uint32_t BitWidth = cast<IntegerType>(Op->getType())->getBitWidth();
3865 auto *EVI = cast<ExtractValueInst>(Op);
3877 if (!isOverflowIntrinsicNoWrap(cast<IntrinsicInst>(CI), DT))
3979 cast<SCEVAddRecExpr>(Accum)->getLoop() == L)) {
4098 const auto *ARLoop = cast<SCEVAddRecExpr>(S)->getLoop();
4107 const auto *SU = cast<SCEVUnknown>(S);
4113 if (isa<Instruction>(V) && DT.dominates(cast<Instruction>(V), BB))
4293 isa<ConstantInt>(RHS) && cast<ConstantInt>(RHS)->isZero()) {
4307 isa<ConstantInt>(RHS) && cast<ConstantInt>(RHS)->isZero()) {
4691 Offset = cast<SCEVConstant>(SA->getOperand(0))->getAPInt();
4695 // Peel off a cast operation
4715 // Re-apply the cast we peeled off earlier
4719 llvm_unreachable("Unknown SCEV cast type!");
4781 const BinaryOperator *BinOp = cast<BinaryOperator>(V);
4892 if (propagatesFullPoison(cast<Instruction>(PoisonUser))) {
4893 if (Pushed.insert(cast<Instruction>(PoisonUser)).second)
4894 PoisonStack.push_back(cast<Instruction>(PoisonUser));
4946 Operator *U = cast<Operator>(V);
5090 const SCEVAddRecExpr *OldAR = cast<SCEVAddRecExpr>(LHS);
5141 uint32_t BitWidth = cast<IntegerType>(SA->getType())->getBitWidth();
5204 // BitCasts are no-op casts so we just eliminate the cast.
5215 return createNodeForGEP(cast<GEPOperator>(U));
5218 return createNodeForPHI(cast<PHINode>(U));
5226 return createNodeForSelectOrPHI(cast<Instruction>(U), U->getOperand(0),
6061 return cast<SCEVConstant>(Val)->getValue();
6085 !cast<Constant>(GEP->getOperand(1))->isNullValue())
6122 cast<IntegerType>(IdxExpr->getType()), IterationNum);
6135 if (cast<ConstantInt>(Result)->getValue().isMinValue()) {
6254 auto *Ty = cast<IntegerType>(RHS->getType());
6268 StableValue = ConstantInt::get(cast<IntegerType>(RHS->getType()), 0);
6637 return cast<SCEVConstant>(V)->getValue();
6639 return dyn_cast<Constant>(cast<SCEVUnknown>(V)->getValue());
6641 const SCEVSignExtendExpr *SS = cast<SCEVSignExtendExpr>(V);
6647 const SCEVZeroExtendExpr *SZ = cast<SCEVZeroExtendExpr>(V);
6653 const SCEVTruncateExpr *ST = cast<SCEVTruncateExpr>(V);
6659 const SCEVAddExpr *SA = cast<SCEVAddExpr>(V);
6698 const SCEVMulExpr *SM = cast<SCEVMulExpr>(V);
6712 const SCEVUDivExpr *SU = cast<SCEVUDivExpr>(V);
6893 if (const SCEVZeroExtendExpr *Cast = dyn_cast<SCEVZeroExtendExpr>(V)) {
6894 const SCEV *Op = getSCEVAtScope(Cast->getOperand(), L);
6895 if (Op == Cast->getOperand())
6896 return Cast; // must be loop invariant
6897 return getZeroExtendExpr(Op, Cast->getType());
6900 if (const SCEVSignExtendExpr *Cast = dyn_cast<SCEVSignExtendExpr>(V)) {
6901 const SCEV *Op = getSCEVAtScope(Cast->getOperand(), L);
6902 if (Op == Cast->getOperand())
6903 return Cast; // must be loop invariant
6904 return getSignExtendExpr(Op, Cast->getType());
6907 if (const SCEVTruncateExpr *Cast = dyn_cast<SCEVTruncateExpr>(V)) {
6908 const SCEV *Op = getSCEVAtScope(Cast->getOperand(), L);
6909 if (Op == Cast->getOperand())
6910 return Cast; // must be loop invariant
6911 return getTruncateExpr(Op, Cast->getType());
7029 return std::make_pair(cast<SCEVConstant>(SE.getConstant(Solution1)),
7030 cast<SCEVConstant>(SE.getConstant(Solution2)));
7787 OutY = cast<SCEVConstant>(ConstOp)->getAPInt();
7919 auto *CI = cast<CallInst>(AssumeVH);
8013 auto *CI = cast<CallInst>(AssumeVH);
8157 C = cast<SCEVConstant>(FoundLHS);
8160 C = cast<SCEVConstant>(FoundRHS);
8243 const auto *LAR = cast<SCEVAddRecExpr>(Less);
8244 const auto *MAR = cast<SCEVAddRecExpr>(More);
8264 const auto &M = cast<SCEVConstant>(More)->getAPInt();
8265 const auto &L = cast<SCEVConstant>(Less)->getAPInt();
8554 APInt ConstFoundRHS = cast<SCEVConstant>(FoundRHS)->getAPInt();
8563 APInt Addend = cast<SCEVConstant>(AddLHS->getOperand(0))->getAPInt();
8568 APInt ConstRHS = cast<SCEVConstant>(RHS)->getAPInt();
8831 APInt A = cast<SCEVConstant>(getOperand(1))->getAPInt();
8864 SolveQuadraticEquation(cast<SCEVAddRecExpr>(NewAddRec), SE)) {
9716 return getLoopDisposition(cast<SCEVCastExpr>(S)->getOperand(), L);
9718 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S);
9750 for (auto *Op : cast<SCEVNAryExpr>(S)->operands()) {
9760 const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
9775 if (auto *I = dyn_cast<Instruction>(cast<SCEVUnknown>(S)->getValue()))
9819 return getBlockDisposition(cast<SCEVCastExpr>(S)->getOperand(), BB);
9825 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S);
9834 const SCEVNAryExpr *NAry = cast<SCEVNAryExpr>(S);
9846 const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
9859 dyn_cast<Instruction>(cast<SCEVUnknown>(S)->getValue())) {
10393 const auto *AR = cast<SCEVAddRecExpr>(Expr);
10409 const auto *AR = cast<SCEVAddRecExpr>(Expr);