• Home
  • Raw
  • Download

Lines Matching refs:ConstantInt

62       ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i));  in BitCastConstantVector()
155 if (isa<ConstantInt>(V) || isa<ConstantFP>(V)) in FoldBitCast()
165 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in FoldBitCast()
196 return ConstantInt::get(FP->getContext(), in FoldBitCast()
223 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) { in ExtractConstantBytes()
228 return ConstantInt::get(CI->getContext(), V); in ExtractConstantBytes()
244 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS)) in ExtractConstantBytes()
268 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1)); in ExtractConstantBytes()
290 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1)); in ExtractConstantBytes()
336 ConstantInt::get(Res->getType(), ByteStart*8)); in ExtractConstantBytes()
354 Constant *N = ConstantInt::get(DestTy, ATy->getNumElements()); in getFoldedSizeOf()
376 Constant *N = ConstantInt::get(DestTy, NumElems); in getFoldedSizeOf()
423 return ConstantInt::get(DestTy, 1); in getFoldedAlignOf()
431 return ConstantInt::get(DestTy, 1); in getFoldedAlignOf()
575 ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i)); in ConstantFoldCastInstruction()
617 return ConstantInt::get(FPC->getContext(), Val); in ConstantFoldCastInstruction()
627 return ConstantInt::get(DestTy, 0); in ConstantFoldCastInstruction()
639 bool isOne = isa<ConstantInt>(Idx) && cast<ConstantInt>(Idx)->isOne(); in ConstantFoldCastInstruction()
651 ConstantInt *CI = cast<ConstantInt>(CE->getOperand(2)); in ConstantFoldCastInstruction()
670 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
685 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
687 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
692 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
694 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
703 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
704 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
738 ConstantInt::get(Ty, i)); in ConstantFoldSelectInstruction()
740 ConstantInt::get(Ty, i)); in ConstantFoldSelectInstruction()
747 if (!isa<ConstantInt>(Cond)) break; in ConstantFoldSelectInstruction()
790 if (ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx)) { in ConstantFoldExtractElementInstruction()
805 ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx); in ConstantFoldInsertElementInstruction()
822 Constant *C = ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i)); in ConstantFoldInsertElementInstruction()
859 ConstantInt::get(Ty, Elt - SrcNumElts)); in ConstantFoldShuffleVectorInstruction()
862 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt)); in ConstantFoldShuffleVectorInstruction()
1019 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
1113 } else if (isa<ConstantInt>(C1)) { in ConstantFoldBinaryInstruction()
1119 if (ConstantInt *CI1 = dyn_cast<ConstantInt>(C1)) { in ConstantFoldBinaryInstruction()
1120 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
1127 return ConstantInt::get(CI1->getContext(), C1V + C2V); in ConstantFoldBinaryInstruction()
1129 return ConstantInt::get(CI1->getContext(), C1V - C2V); in ConstantFoldBinaryInstruction()
1131 return ConstantInt::get(CI1->getContext(), C1V * C2V); in ConstantFoldBinaryInstruction()
1134 return ConstantInt::get(CI1->getContext(), C1V.udiv(C2V)); in ConstantFoldBinaryInstruction()
1139 return ConstantInt::get(CI1->getContext(), C1V.sdiv(C2V)); in ConstantFoldBinaryInstruction()
1142 return ConstantInt::get(CI1->getContext(), C1V.urem(C2V)); in ConstantFoldBinaryInstruction()
1147 return ConstantInt::get(CI1->getContext(), C1V.srem(C2V)); in ConstantFoldBinaryInstruction()
1149 return ConstantInt::get(CI1->getContext(), C1V & C2V); in ConstantFoldBinaryInstruction()
1151 return ConstantInt::get(CI1->getContext(), C1V | C2V); in ConstantFoldBinaryInstruction()
1153 return ConstantInt::get(CI1->getContext(), C1V ^ C2V); in ConstantFoldBinaryInstruction()
1156 return ConstantInt::get(CI1->getContext(), C1V.shl(C2V)); in ConstantFoldBinaryInstruction()
1160 return ConstantInt::get(CI1->getContext(), C1V.lshr(C2V)); in ConstantFoldBinaryInstruction()
1164 return ConstantInt::get(CI1->getContext(), C1V.ashr(C2V)); in ConstantFoldBinaryInstruction()
1213 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, i)); in ConstantFoldBinaryInstruction()
1215 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i)); in ConstantFoldBinaryInstruction()
1265 return ConstantInt::getFalse(C1->getContext()); in ConstantFoldBinaryInstruction()
1304 if (!isa<ConstantInt>(C1) || !isa<ConstantInt>(C2)) in IdxCompare()
1308 if (cast<ConstantInt>(C1)->getValue().getActiveBits() > 64 || in IdxCompare()
1309 cast<ConstantInt>(C2)->getValue().getActiveBits() > 64) in IdxCompare()
1314 int64_t C1Val = cast<ConstantInt>(C1)->getSExtValue(); in IdxCompare()
1315 int64_t C2Val = cast<ConstantInt>(C2)->getSExtValue(); in IdxCompare()
1353 ConstantInt *R = nullptr; in evaluateFCmpRelation()
1354 R = dyn_cast<ConstantInt>( in evaluateFCmpRelation()
1358 R = dyn_cast<ConstantInt>( in evaluateFCmpRelation()
1362 R = dyn_cast<ConstantInt>( in evaluateFCmpRelation()
1443 ConstantInt *R = nullptr; in evaluateICmpRelation()
1445 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1449 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1453 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1650 if (isa<ConstantInt>(CE1->getOperand(i))) in evaluateICmpRelation()
1658 if (isa<ConstantInt>(CE2->getOperand(i))) in evaluateICmpRelation()
1705 return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(Predicate)); in ConstantFoldCompareInstruction()
1709 return ConstantInt::get(ResultTy, CmpInst::isUnordered(Predicate)); in ConstantFoldCompareInstruction()
1718 return ConstantInt::getFalse(C1->getContext()); in ConstantFoldCompareInstruction()
1720 return ConstantInt::getTrue(C1->getContext()); in ConstantFoldCompareInstruction()
1728 return ConstantInt::getFalse(C1->getContext()); in ConstantFoldCompareInstruction()
1730 return ConstantInt::getTrue(C1->getContext()); in ConstantFoldCompareInstruction()
1738 if (isa<ConstantInt>(C2)) in ConstantFoldCompareInstruction()
1748 if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) { in ConstantFoldCompareInstruction()
1749 const APInt &V1 = cast<ConstantInt>(C1)->getValue(); in ConstantFoldCompareInstruction()
1750 const APInt &V2 = cast<ConstantInt>(C2)->getValue(); in ConstantFoldCompareInstruction()
1753 case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2); in ConstantFoldCompareInstruction()
1754 case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2); in ConstantFoldCompareInstruction()
1755 case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2)); in ConstantFoldCompareInstruction()
1756 case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2)); in ConstantFoldCompareInstruction()
1757 case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2)); in ConstantFoldCompareInstruction()
1758 case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2)); in ConstantFoldCompareInstruction()
1759 case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2)); in ConstantFoldCompareInstruction()
1760 case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2)); in ConstantFoldCompareInstruction()
1761 case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2)); in ConstantFoldCompareInstruction()
1762 case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2)); in ConstantFoldCompareInstruction()
1773 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered); in ConstantFoldCompareInstruction()
1775 return ConstantInt::get(ResultTy, R!=APFloat::cmpUnordered); in ConstantFoldCompareInstruction()
1777 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered || in ConstantFoldCompareInstruction()
1780 return ConstantInt::get(ResultTy, R==APFloat::cmpEqual); in ConstantFoldCompareInstruction()
1782 return ConstantInt::get(ResultTy, R!=APFloat::cmpEqual); in ConstantFoldCompareInstruction()
1784 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan || in ConstantFoldCompareInstruction()
1787 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered || in ConstantFoldCompareInstruction()
1790 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan); in ConstantFoldCompareInstruction()
1792 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered || in ConstantFoldCompareInstruction()
1795 return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan); in ConstantFoldCompareInstruction()
1797 return ConstantInt::get(ResultTy, R!=APFloat::cmpGreaterThan); in ConstantFoldCompareInstruction()
1799 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan || in ConstantFoldCompareInstruction()
1802 return ConstantInt::get(ResultTy, R!=APFloat::cmpLessThan); in ConstantFoldCompareInstruction()
1804 return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan || in ConstantFoldCompareInstruction()
1815 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, i)); in ConstantFoldCompareInstruction()
1817 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i)); in ConstantFoldCompareInstruction()
1884 return ConstantInt::get(ResultTy, Result); in ConstantFoldCompareInstruction()
1955 return ConstantInt::get(ResultTy, Result); in ConstantFoldCompareInstruction()
2010 if (!cast<ConstantInt>(Idxs[0])->isOne()) in isInBoundsIndices()
2020 const ConstantInt *CI) { in isIndexInRangeOfSequentialType()
2120 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0)) in ConstantFoldGetElementPtrImpl()
2192 bool Unknown = !isa<ConstantInt>(Idxs[0]); in ConstantFoldGetElementPtrImpl()
2195 auto *CI = dyn_cast<ConstantInt>(Idxs[i]); in ConstantFoldGetElementPtrImpl()
2236 ConstantInt *Factor = ConstantInt::get(CI->getType(), NumElements); in ConstantFoldGetElementPtrImpl()