Home | History | Annotate | Download | only in IR

Lines Matching refs:ConstantInt

62       ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i));
154 if (isa<ConstantInt>(V) || isa<ConstantFP>(V))
164 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
181 return ConstantInt::get(FP->getContext(),
208 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
213 return ConstantInt::get(CI->getContext(), V);
229 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS))
253 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
275 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
321 ConstantInt::get(Res->getType(), ByteStart*8));
340 Constant *N = ConstantInt::get(DestTy, ATy->getNumElements());
362 Constant *N = ConstantInt::get(DestTy, NumElems);
410 return ConstantInt
418 return ConstantInt::get(DestTy, 1);
562 ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i));
599 return ConstantInt::get(FPC->getContext(), Val);
609 return ConstantInt::get(DestTy, 0);
621 bool isOne = isa<ConstantInt>(Idx) && cast<ConstantInt>(Idx)->isOne();
633 ConstantInt *CI = cast<ConstantInt>(CE->getOperand(2));
652 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
663 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
665 return ConstantInt::get(V->getContext(),
670 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
672 return ConstantInt::get(V->getContext(),
678 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
679 return ConstantInt::get(V->getContext(),
713 ConstantInt::get(Ty, i));
715 ConstantInt::get(Ty, i));
722 if (!isa<ConstantInt>(Cond)) break;
765 if (ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx)) {
778 ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx);
791 ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i));
828 ConstantInt::get(Ty, Elt - SrcNumElts));
831 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt));
904 ConstantInt *CI;
906 if (((CI = dyn_cast<ConstantInt>(C1)) && CI->getValue()[0]) ||
907 ((CI = dyn_cast<ConstantInt>(C2)) && CI->getValue()[0]) ||
918 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2))
952 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1046 } else if (isa<ConstantInt>(C1)) {
1047 // If C1 is a ConstantInt and C2 is not, swap the operands.
1053 if (ConstantInt *CI1 = dyn_cast<ConstantInt>(C1)) {
1054 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1061 return ConstantInt::get(CI1->getContext(), C1V + C2V);
1063 return ConstantInt::get(CI1->getContext(), C1V - C2V);
1065 return ConstantInt::get(CI1->getContext(), C1V * C2V);
1068 return ConstantInt::get(CI1->getContext(), C1V.udiv(C2V));
1073 return ConstantInt::get(CI1->getContext(), C1V.sdiv(C2V));
1076 return ConstantInt::get(CI1->getContext(), C1V.urem(C2V));
1081 return ConstantInt::get(CI1->getContext(), C1V.srem(C2V));
1083 return ConstantInt::get(CI1->getContext(), C1V & C2V);
1085 return ConstantInt::get(CI1->getContext(), C1V | C2V);
1087 return ConstantInt::get(CI1->getContext(), C1V ^ C2V);
1091 return ConstantInt::get(CI1->getContext(), C1V.shl(shiftAmt));
1098 return ConstantInt::get(CI1->getContext(), C1V.lshr(shiftAmt));
1105 return ConstantInt::get(CI1->getContext(), C1V.ashr(shiftAmt));
1156 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, i));
1158 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i));
1208 return ConstantInt
1245 // Ok, we found a different index. If they are not ConstantInt, we can't do
1247 if (!isa<ConstantInt>(C1) || !isa<ConstantInt>(C2))
1267 if (cast<ConstantInt>(C1)->getSExtValue() <
1268 cast<ConstantInt>(C2)->getSExtValue())
1295 ConstantInt *R = nullptr;
1296 R = dyn_cast<ConstantInt>(
1300 R = dyn_cast<ConstantInt>(
1304 R = dyn_cast<ConstantInt>(
1355 /// constants (like ConstantInt) to be the simplest, followed by
1370 ConstantInt *R = nullptr;
1372 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1376 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1380 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1573 if (isa<ConstantInt>(CE1->getOperand(i)))
1581 if (isa<ConstantInt>(CE2->getOperand(i)))
1625 return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(pred));
1634 return ConstantInt::getFalse(C1->getContext());
1636 return ConstantInt::getTrue(C1->getContext());
1644 return ConstantInt::getFalse(C1->getContext());
1646 return ConstantInt::getTrue(C1->getContext());
1654 if (isa<ConstantInt>(C2))
1664 if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) {
1665 APInt V1 = cast<ConstantInt>(C1)->getValue();
1666 APInt V2 = cast<ConstantInt>(C2)->getValue();
1669 case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2);
1670 case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2);
1671 case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2));
1672 case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2));
1673 case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2));
1674 case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2));
1675 case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2));
1676 case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2));
1677 case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2));
1678 case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2));
1689 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered);
1691 return ConstantInt::get(ResultTy, R!=APFloat::cmpUnordered);
1693 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered ||
1696 return ConstantInt::get(ResultTy, R==APFloat::cmpEqual);
1698 return ConstantInt::get(ResultTy, R!=APFloat::cmpEqual);
1700 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan ||
1703 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered ||
1706 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan);
1708 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered ||
1711 return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan);
1713 return ConstantInt::get(ResultTy, R!=APFloat::cmpGreaterThan);
1715 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan ||
1718 return ConstantInt::get(ResultTy, R!=APFloat::cmpLessThan);
1720 return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan ||
1731 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, i));
1733 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i));
1797 return ConstantInt::get(ResultTy, Result);
1867 return ConstantInt::get(ResultTy, Result);
1921 if (!cast<ConstantInt>(Idxs[0])->isOne())
1929 /// \brief Test whether a given ConstantInt is in-range for a SequentialType.
1931 const ConstantInt *CI) {
2025 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0))
2096 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idxs[i])) {
2110 ConstantInt *Factor = ConstantInt::get(CI->getType(), NumElements);