• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/IR/

Lines Matching refs:ConstantInt

73       ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i));
157 if (isa<ConstantInt>(V) || isa<ConstantFP>(V))
167 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
198 return ConstantInt::get(FP->getContext(),
225 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
230 return ConstantInt::get(CI->getContext(), V);
246 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS))
270 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
293 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
340 ConstantInt::get(Res->getType(), ByteStart*8));
357 Constant *N = ConstantInt::get(DestTy, ATy->getNumElements());
379 Constant *N = ConstantInt::get(DestTy, NumElems);
425 return ConstantInt::get(DestTy, 1);
433 return ConstantInt::get(DestTy, 1);
592 ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i));
632 return ConstantInt::get(FPC->getContext(), IntVal);
642 return ConstantInt::get(DestTy, 0);
663 bool isOne = isa<ConstantInt>(Idx) && cast<ConstantInt>(Idx)->isOne();
675 ConstantInt *CI = cast<ConstantInt>(CE->getOperand(2));
694 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
704 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
706 return ConstantInt::get(V->getContext(),
711 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
713 return ConstantInt::get(V->getContext(),
722 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
723 return ConstantInt::get(V->getContext(),
758 ConstantInt::get(Ty, i));
760 ConstantInt::get(Ty, i));
767 if (!isa<ConstantInt>(Cond)) break;
809 auto *CIdx = dyn_cast<ConstantInt>(Idx);
858 ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx);
882 Constant *C = ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i));
907 ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, 0));
932 ConstantInt::get(Ty, Elt - SrcNumElts));
935 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt));
1005 assert(!isa<ConstantInt>(C) && "Unexpected Integer UnaryOp");
1027 Constant *ExtractIdx = ConstantInt::get(Ty, i);
1173 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1287 } else if (isa<ConstantInt>(C1)) {
1288 // If C1 is a ConstantInt and C2 is not, swap the operands.
1293 if (ConstantInt *CI1 = dyn_cast<ConstantInt>(C1)) {
1294 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) {
1301 return ConstantInt::get(CI1->getContext(), C1V + C2V);
1303 return ConstantInt::get(CI1->getContext(), C1V - C2V);
1305 return ConstantInt::get(CI1->getContext(), C1V * C2V);
1308 return ConstantInt::get(CI1->getContext(), C1V.udiv(C2V));
1313 return ConstantInt::get(CI1->getContext(), C1V.sdiv(C2V));
1316 return ConstantInt::get(CI1->getContext(), C1V.urem(C2V));
1321 return ConstantInt::get(CI1->getContext(), C1V.srem(C2V));
1323 return ConstantInt::get(CI1->getContext(), C1V & C2V);
1325 return ConstantInt::get(CI1->getContext(), C1V | C2V);
1327 return ConstantInt::get(CI1->getContext(), C1V ^ C2V);
1330 return ConstantInt::get(CI1->getContext(), C1V.shl(C2V));
1334 return ConstantInt::get(CI1->getContext(), C1V.lshr(C2V));
1338 return ConstantInt::get(CI1->getContext(), C1V.ashr(C2V));
1402 Constant *ExtractIdx = ConstantInt::get(Ty, i);
1458 return ConstantInt::getFalse(C1->getContext());
1495 // Ok, we found a different index. If they are not ConstantInt, we can't do
1497 if (!isa<ConstantInt>(C1) || !isa<ConstantInt>(C2))
1501 if (cast<ConstantInt>(C1)->getValue().getActiveBits() > 64 ||
1502 cast<ConstantInt>(C2)->getValue().getActiveBits() > 64)
1507 int64_t C1Val = cast<ConstantInt>(C1)->getSExtValue();
1508 int64_t C2Val = cast<ConstantInt>(C2)->getSExtValue();
1547 ConstantInt *R = nullptr;
1548 R = dyn_cast<ConstantInt>(
1552 R = dyn_cast<ConstantInt>(
1556 R = dyn_cast<ConstantInt>(
1622 /// constants (like ConstantInt) to be the simplest, followed by
1637 ConstantInt *R = nullptr;
1639 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1643 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1647 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1848 if (isa<ConstantInt>(CE1->getOperand(i)))
1856 if (isa<ConstantInt>(CE2->getOperand(i)))
1904 return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(Predicate));
1908 return ConstantInt::get(ResultTy, CmpInst::isUnordered(Predicate));
1919 return ConstantInt::getFalse(C1->getContext());
1921 return ConstantInt::getTrue(C1->getContext());
1931 return ConstantInt::getFalse(C1->getContext());
1933 return ConstantInt::getTrue(C1->getContext());
1941 if (isa<ConstantInt>(C2))
1951 if (isa<ConstantInt>(C1) && isa<ConstantInt>(C2)) {
1952 const APInt &V1 = cast<ConstantInt>(C1)->getValue();
1953 const APInt &V2 = cast<ConstantInt>(C2)->getValue();
1956 case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2);
1957 case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2);
1958 case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2));
1959 case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2));
1960 case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2));
1961 case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2));
1962 case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2));
1963 case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2));
1964 case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2));
1965 case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2));
1976 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered);
1978 return ConstantInt::get(ResultTy, R!=APFloat::cmpUnordered);
1980 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered ||
1983 return ConstantInt::get(ResultTy, R==APFloat::cmpEqual);
1985 return ConstantInt::get(ResultTy, R!=APFloat::cmpEqual);
1987 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan ||
1990 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered ||
1993 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan);
1995 return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered ||
1998 return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan);
2000 return ConstantInt::get(ResultTy, R!=APFloat::cmpGreaterThan);
2002 return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan ||
2005 return ConstantInt::get(ResultTy, R!=APFloat::cmpLessThan);
2007 return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan ||
2031 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, i));
2033 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i));
2106 return ConstantInt::get(ResultTy, Result);
2177 return ConstantInt::get(ResultTy, Result);
2234 if (auto *CI = dyn_cast<ConstantInt>(Idxs[0])) {
2239 CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue());
2250 /// Test whether a given ConstantInt is in-range for a SequentialType.
2252 const ConstantInt *CI) {
2354 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0))
2443 !isa<ConstantInt>(Idxs[0]) && !isa<ConstantDataVector>(Idxs[0]);
2446 if (!isa<ConstantInt>(Idxs[i]) && !isa<ConstantDataVector>(Idxs[i])) {
2451 if (!isa<ConstantInt>(Idxs[i - 1]) && !isa<ConstantDataVector>(Idxs[i - 1]))
2470 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idxs[i])) {
2483 auto *CI = cast<ConstantInt>(CV->getElementAsConstant(I));
2525 ConstantInt::get(CurrIdx->getType()->getScalarType(), NumElements);