Lines Matching refs:ConstantInt

84     if (isa<ConstantInt>(V) || isa<ConstantFP>(V))  in FoldBitCast()
90 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in FoldBitCast()
116 return ConstantInt::get(FP->getContext(), in FoldBitCast()
181 Constant *C = ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i)); in ConstantFoldCastInstruction()
218 return ConstantInt::get(FPC->getContext(), IntVal); in ConstantFoldCastInstruction()
223 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
233 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
235 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
240 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
242 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
251 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
252 return ConstantInt::get(V->getContext(), in ConstantFoldCastInstruction()
281 ConstantInt::get(Ty, i)); in ConstantFoldSelectInstruction()
283 ConstantInt::get(Ty, i)); in ConstantFoldSelectInstruction()
292 if (!isa<ConstantInt>(Cond)) break; in ConstantFoldSelectInstruction()
329 if (isa<ConstantInt>(C) || isa<GlobalVariable>(C) || isa<ConstantFP>(C) || in ConstantFoldSelectInstruction()
358 auto *CIdx = dyn_cast<ConstantInt>(Idx); in ConstantFoldExtractElementInstruction()
386 if (const auto *IEIdx = dyn_cast<ConstantInt>(CE->getOperand(2))) { in ConstantFoldExtractElementInstruction()
420 ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx); in ConstantFoldInsertElementInstruction()
444 Constant *C = ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i)); in ConstantFoldInsertElementInstruction()
469 ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, 0)); in ConstantFoldShuffleVectorInstruction()
500 ConstantInt::get(Ty, Elt - SrcNumElts)); in ConstantFoldShuffleVectorInstruction()
503 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt)); in ConstantFoldShuffleVectorInstruction()
573 assert(!isa<ConstantInt>(C) && "Unexpected Integer UnaryOp"); in ConstantFoldUnaryInstruction()
594 Constant *ExtractIdx = ConstantInt::get(Ty, i); in ConstantFoldUnaryInstruction()
733 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
799 } else if (isa<ConstantInt>(C1)) { in ConstantFoldBinaryInstruction()
807 if (ConstantInt *CI1 = dyn_cast<ConstantInt>(C1)) { in ConstantFoldBinaryInstruction()
808 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
815 return ConstantInt::get(CI1->getContext(), C1V + C2V); in ConstantFoldBinaryInstruction()
817 return ConstantInt::get(CI1->getContext(), C1V - C2V); in ConstantFoldBinaryInstruction()
819 return ConstantInt::get(CI1->getContext(), C1V * C2V); in ConstantFoldBinaryInstruction()
822 return ConstantInt::get(CI1->getContext(), C1V.udiv(C2V)); in ConstantFoldBinaryInstruction()
827 return ConstantInt::get(CI1->getContext(), C1V.sdiv(C2V)); in ConstantFoldBinaryInstruction()
830 return ConstantInt::get(CI1->getContext(), C1V.urem(C2V)); in ConstantFoldBinaryInstruction()
835 return ConstantInt::get(CI1->getContext(), C1V.srem(C2V)); in ConstantFoldBinaryInstruction()
837 return ConstantInt::get(CI1->getContext(), C1V & C2V); in ConstantFoldBinaryInstruction()
839 return ConstantInt::get(CI1->getContext(), C1V | C2V); in ConstantFoldBinaryInstruction()
841 return ConstantInt::get(CI1->getContext(), C1V ^ C2V); in ConstantFoldBinaryInstruction()
844 return ConstantInt::get(CI1->getContext(), C1V.shl(C2V)); in ConstantFoldBinaryInstruction()
848 return ConstantInt::get(CI1->getContext(), C1V.lshr(C2V)); in ConstantFoldBinaryInstruction()
852 return ConstantInt::get(CI1->getContext(), C1V.ashr(C2V)); in ConstantFoldBinaryInstruction()
916 Constant *ExtractIdx = ConstantInt::get(Ty, i); in ConstantFoldBinaryInstruction()
976 return ConstantInt::getFalse(C1->getContext()); in ConstantFoldBinaryInstruction()
1156 return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(Predicate)); in ConstantFoldCompareInstruction()
1160 return ConstantInt::get(ResultTy, CmpInst::isUnordered(Predicate)); in ConstantFoldCompareInstruction()
1178 if (isa<ConstantInt>(C2)) in ConstantFoldCompareInstruction()
1188 if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) { in ConstantFoldCompareInstruction()
1189 const APInt &V1 = cast<ConstantInt>(C1)->getValue(); in ConstantFoldCompareInstruction()
1190 const APInt &V2 = cast<ConstantInt>(C2)->getValue(); in ConstantFoldCompareInstruction()
1191 return ConstantInt::get(ResultTy, ICmpInst::compare(V1, V2, Predicate)); in ConstantFoldCompareInstruction()
1195 return ConstantInt::get(ResultTy, FCmpInst::compare(C1V, C2V, Predicate)); in ConstantFoldCompareInstruction()
1218 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1220 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, I)); in ConstantFoldCompareInstruction()
1235 return ConstantInt::getFalse(ResultTy); in ConstantFoldCompareInstruction()
1237 return ConstantInt::getTrue(ResultTy); in ConstantFoldCompareInstruction()
1325 return ConstantInt::get(ResultTy, Result); in ConstantFoldCompareInstruction()