Lines Matching refs:ConstantExpr
44 return cast<ConstantInt>(ConstantExpr::getExtractElement(V, Idx)); in ExtractElement()
62 Result = ConstantExpr::getAdd(In1, In2); in AddWithOverflow()
97 Result = ConstantExpr::getSub(In1, In2); in SubWithOverflow()
310 Elt = ConstantExpr::getExtractValue(Elt, LaterIndices); in FoldCmpLoadFromIndexedGlobal()
313 if (AndCst) Elt = ConstantExpr::getAnd(Elt, AndCst); in FoldCmpLoadFromIndexedGlobal()
729 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && in FoldGEPICmp()
730 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) { in FoldGEPICmp()
753 ConstantExpr::getSub(ConstantInt::getAllOnesValue(CI->getType()), CI); in FoldICmpAddOpCst()
761 return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantExpr::getNeg(CI)); in FoldICmpAddOpCst()
774 return new ICmpInst(ICmpInst::ICMP_SGT, X, ConstantExpr::getSub(SMax, CI)); in FoldICmpAddOpCst()
785 return new ICmpInst(ICmpInst::ICMP_SLT, X, ConstantExpr::getSub(SMax, C)); in FoldICmpAddOpCst()
820 Constant *Prod = ConstantExpr::getMul(CmpRHS, DivRHS); in FoldICmpDivCst()
825 bool ProdOV = (DivIsSigned ? ConstantExpr::getSDiv(Prod, DivRHS) : in FoldICmpDivCst()
826 ConstantExpr::getUDiv(Prod, DivRHS)) != CmpRHS; in FoldICmpDivCst()
858 LoBound = ConstantExpr::getNeg(SubOne(RangeSize)); in FoldICmpDivCst()
870 ConstantInt *DivNeg =cast<ConstantInt>(ConstantExpr::getNeg(RangeSize)); in FoldICmpDivCst()
876 RangeSize = cast<ConstantInt>(ConstantExpr::getNeg(RangeSize)); in FoldICmpDivCst()
880 HiBound = cast<ConstantInt>(ConstantExpr::getNeg(RangeSize)); in FoldICmpDivCst()
1250 ConstantExpr::getZExt(AndCst, Cast->getSrcTy())); in visitICmpInstWithInstAndIntCst()
1253 ConstantExpr::getZExt(RHS, Cast->getSrcTy())); in visitICmpInstWithInstAndIntCst()
1266 ConstantExpr::getTrunc(AndCst, Ty)); in visitICmpInstWithInstAndIntCst()
1269 ConstantExpr::getTrunc(RHS, Ty)); in visitICmpInstWithInstAndIntCst()
1312 cast<ConstantInt>(ConstantExpr::getShl(AndCst, ShAmt)); in visitICmpInstWithInstAndIntCst()
1314 cast<ConstantInt>(ConstantExpr::getShl(RHS, ShAmt)); in visitICmpInstWithInstAndIntCst()
1324 NewCst = ConstantExpr::getLShr(RHS, ShAmt); in visitICmpInstWithInstAndIntCst()
1326 NewCst = ConstantExpr::getShl(RHS, ShAmt); in visitICmpInstWithInstAndIntCst()
1330 if (ConstantExpr::get(ShiftOpcode, NewCst, ShAmt) != RHS) { in visitICmpInstWithInstAndIntCst()
1342 NewAndCst = ConstantExpr::getLShr(AndCst, ShAmt); in visitICmpInstWithInstAndIntCst()
1344 NewAndCst = ConstantExpr::getShl(AndCst, ShAmt); in visitICmpInstWithInstAndIntCst()
1400 ConstantExpr::getOr(ConstantExpr::getNUWShl(One, C), One); in visitICmpInstWithInstAndIntCst()
1566 ConstantExpr::getShl(ConstantExpr::getLShr(RHS, ShAmt), in visitICmpInstWithInstAndIntCst()
1578 ConstantExpr::getLShr(RHS, ShAmt)); in visitICmpInstWithInstAndIntCst()
1584 ConstantExpr::getLShr(RHS, ShAmt)); in visitICmpInstWithInstAndIntCst()
1595 ConstantExpr::getLShr(RHS, ShAmt)); in visitICmpInstWithInstAndIntCst()
1632 Constant *NCI = ConstantExpr::getTrunc( in visitICmpInstWithInstAndIntCst()
1633 ConstantExpr::getAShr(RHS, in visitICmpInstWithInstAndIntCst()
1734 ConstantExpr::getNeg(LHSC)); in visitICmpInstWithInstAndIntCst()
1743 ConstantExpr::getNeg(LHSC)); in visitICmpInstWithInstAndIntCst()
1774 ConstantExpr::getSub(RHS, BOp1C)); in visitICmpInstWithInstAndIntCst()
1796 ConstantExpr::getXor(RHS, BOC)); in visitICmpInstWithInstAndIntCst()
1808 ConstantExpr::getSub(BOp0C, RHS)); in visitICmpInstWithInstAndIntCst()
1819 Constant *NotCI = ConstantExpr::getNot(RHS); in visitICmpInstWithInstAndIntCst()
1820 if (!ConstantExpr::getAnd(BOC, NotCI)->isNullValue()) in visitICmpInstWithInstAndIntCst()
1854 Constant *NegX = ConstantExpr::getNeg(BOC); in visitICmpInstWithInstAndIntCst()
1935 RHSOp = ConstantExpr::getIntToPtr(RHSC, SrcTy); in visitICmpInstWithCastAndCast()
1981 Constant *Res1 = ConstantExpr::getTrunc(CI, SrcTy); in visitICmpInstWithCastAndCast()
1982 Constant *Res2 = ConstantExpr::getCast(LHSCI->getOpcode(), in visitICmpInstWithCastAndCast()
3124 Op1 = ConstantExpr::getICmp(I.getPredicate(), C, RHSC); in visitICmpInst()
3128 Op2 = ConstantExpr::getICmp(I.getPredicate(), C, RHSC); in visitICmpInst()
3214 Op1 = ConstantExpr::getBitCast(Op1C, Op0->getType()); in visitICmpInst()
3263 return new ICmpInst(Pred, A, ConstantExpr::getNeg(RHSC)); in visitICmpInst()
3387 ConstantExpr::getNeg(RHSC)); in visitICmpInst()
3511 return new ICmpInst(I.getPredicate(), ConstantExpr::getNot(RHSC), A); in visitICmpInst()
3858 ? ConstantExpr::getFPToUI(RHSC, IntTy) in FoldFCmp_IntToFP_Cst()
3859 : ConstantExpr::getFPToSI(RHSC, IntTy); in FoldFCmp_IntToFP_Cst()
3862 ? ConstantExpr::getUIToFP(RHSInt, RHSC->getType()) == RHSC in FoldFCmp_IntToFP_Cst()
3863 : ConstantExpr::getSIToFP(RHSInt, RHSC->getType()) == RHSC; in FoldFCmp_IntToFP_Cst()
4035 ConstantExpr::getFNeg(RHSC)); in visitFCmpInst()