Lines Matching refs:ConstantExpr
157 C = ConstantExpr::getIntToPtr(C, PTy);
184 /// not. This can return null if the element index is a ConstantExpr, or if
248 const ConstantExpr *CE = dyn_cast<ConstantExpr>(this);
251 // ConstantExpr traps if any operands can trap.
344 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this))
346 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0));
347 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1));
366 /// removeDeadUsersOfConstant - If the specified constantexpr is dead, remove
368 /// constantexpr.
666 /// index if we can, otherwise return null (e.g. if C is a ConstantExpr).
699 /// index if we can, otherwise return null (e.g. if C is a ConstantExpr).
765 // is a constantexpr or something else weird in the array, since it is so
946 // is a constantexpr or something else weird in the array, since it is so
1012 // the operand list constants a ConstantExpr or something else strange.
1028 // Utility function for determining if a ConstantExpr is a CastOp or not. This
1031 bool ConstantExpr::isCast() const {
1035 bool ConstantExpr::isCompare() const {
1039 bool ConstantExpr::isGEPWithNoNotionalOverIndexing() const {
1064 bool ConstantExpr::hasIndices() const {
1069 ArrayRef<unsigned> ConstantExpr::getIndices() const {
1077 unsigned ConstantExpr::getPredicate() const {
1085 ConstantExpr::getWithOperandReplaced(unsigned OpNo, Constant *Op) const {
1089 return const_cast<ConstantExpr*>(this);
1101 Constant *ConstantExpr::
1109 return const_cast<ConstantExpr*>(this);
1124 return ConstantExpr::getCast(getOpcode(), Ops[0], Ty);
1126 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]);
1128 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]);
1130 return ConstantExpr::getExtractElement(Ops[0], Ops[1]);
1132 return ConstantExpr::getInsertValue(Ops[0], Ops[1], getIndices());
1134 return ConstantExpr::getExtractValue(Ops[0], getIndices());
1136 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]);
1138 return ConstantExpr::getGetElementPtr(Ops[0], Ops.slice(1),
1142 return ConstantExpr::getCompare(getPredicate(), Ops[0], Ops[1]);
1145 return ConstantExpr::get(getOpcode(), Ops[0], Ops[1], SubclassOptionalData);
1418 //---- ConstantExpr::get() implementations.
1438 Constant *ConstantExpr::getCast(unsigned oc, Constant *C, Type *Ty) {
1442 assert(CastInst::castIsValid(opc, C, Ty) && "Invalid constantexpr cast!");
1462 Constant *ConstantExpr::getZExtOrBitCast(Constant *C, Type *Ty) {
1468 Constant *ConstantExpr::getSExtOrBitCast(Constant *C, Type *Ty) {
1474 Constant *ConstantExpr::getTruncOrBitCast(Constant *C, Type *Ty) {
1480 Constant *ConstantExpr::getPointerCast(Constant *S, Type *Ty) {
1490 Constant *ConstantExpr::getIntegerCast(Constant *C, Type *Ty,
1503 Constant *ConstantExpr::getFPCast(Constant *C, Type *Ty) {
1515 Constant *ConstantExpr::getTrunc(Constant *C, Type *Ty) {
1529 Constant *ConstantExpr::getSExt(Constant *C, Type *Ty) {
1543 Constant *ConstantExpr::getZExt(Constant *C, Type *Ty) {
1557 Constant *ConstantExpr::getFPTrunc(Constant *C, Type *Ty) {
1569 Constant *ConstantExpr::getFPExtend(Constant *C, Type *Ty) {
1581 Constant *ConstantExpr::getUIToFP(Constant *C, Type *Ty) {
1592 Constant *ConstantExpr::getSIToFP(Constant *C, Type *Ty) {
1603 Constant *ConstantExpr::getFPToUI(Constant *C, Type *Ty) {
1614 Constant *ConstantExpr::getFPToSI(Constant *C, Type *Ty) {
1625 Constant *ConstantExpr::getPtrToInt(Constant *C, Type *DstTy) {
1637 Constant *ConstantExpr::getIntToPtr(Constant *C, Type *DstTy) {
1649 Constant *ConstantExpr::getBitCast(Constant *C, Type *DstTy) {
1651 "Invalid constantexpr bitcast!");
1660 Constant *ConstantExpr::get(unsigned Opcode, Constant *C1, Constant *C2,
1737 Constant *ConstantExpr::getSizeOf(Type* Ty) {
1747 Constant *ConstantExpr::getAlignOf(Type* Ty) {
1761 Constant *ConstantExpr::getOffsetOf(StructType* STy, unsigned FieldNo) {
1766 Constant *ConstantExpr::getOffsetOf(Type* Ty, Constant *FieldNo) {
1779 Constant *ConstantExpr::getCompare(unsigned short Predicate,
1801 Constant *ConstantExpr::getSelect(Constant *C, Constant *V1, Constant *V2) {
1814 Constant *ConstantExpr::getGetElementPtr(Constant *C, ArrayRef<Value *> Idxs,
1851 ConstantExpr::getICmp(unsigned short pred, Constant *LHS, Constant *RHS) {
1873 ConstantExpr::getFCmp(unsigned short pred, Constant *LHS, Constant *RHS) {
1893 Constant *ConstantExpr::getExtractElement(Constant *Val, Constant *Idx) {
1911 Constant *ConstantExpr::getInsertElement(Constant *Val, Constant *Elt,
1930 Constant *ConstantExpr::getShuffleVector(Constant *V1, Constant *V2,
1950 Constant *ConstantExpr::getInsertValue(Constant *Agg, Constant *Val,
1962 Constant *ConstantExpr::getExtractValue(Constant *Agg,
1978 Constant *ConstantExpr::getNeg(Constant *C, bool HasNUW, bool HasNSW) {
1985 Constant *ConstantExpr::getFNeg(Constant *C) {
1991 Constant *ConstantExpr::getNot(Constant *C) {
1997 Constant *ConstantExpr::getAdd(Constant *C1, Constant *C2,
2004 Constant *ConstantExpr::getFAdd(Constant *C1, Constant *C2) {
2008 Constant *ConstantExpr::getSub(Constant *C1, Constant *C2,
2015 Constant *ConstantExpr::getFSub(Constant *C1, Constant *C2) {
2019 Constant *ConstantExpr::getMul(Constant *C1, Constant *C2,
2026 Constant *ConstantExpr::getFMul(Constant *C1, Constant *C2) {
2030 Constant *ConstantExpr::getUDiv(Constant *C1, Constant *C2, bool isExact) {
2035 Constant *ConstantExpr::getSDiv(Constant *C1, Constant *C2, bool isExact) {
2040 Constant *ConstantExpr::getFDiv(Constant *C1, Constant *C2) {
2044 Constant *ConstantExpr::getURem(Constant *C1, Constant *C2) {
2048 Constant *ConstantExpr::getSRem(Constant *C1, Constant *C2) {
2052 Constant *ConstantExpr::getFRem(Constant *C1, Constant *C2) {
2056 Constant *ConstantExpr::getAnd(Constant *C1, Constant *C2) {
2060 Constant *ConstantExpr::getOr(Constant *C1, Constant *C2) {
2064 Constant *ConstantExpr::getXor(Constant *C1, Constant *C2) {
2068 Constant *ConstantExpr::getShl(Constant *C1, Constant *C2,
2075 Constant *ConstantExpr::getLShr(Constant *C1, Constant *C2, bool isExact) {
2080 Constant *ConstantExpr::getAShr(Constant *C1, Constant *C2, bool isExact) {
2088 Constant *ConstantExpr::getBinOpIdentity(unsigned Opcode, Type *Ty) {
2111 Constant *ConstantExpr::getBinOpAbsorber(unsigned Opcode, Type *Ty) {
2128 void ConstantExpr::destroyConstant() {
2133 const char *ConstantExpr::getOpcodeName() const {
2142 : ConstantExpr(DestTy, Instruction::GetElementPtr,
2700 void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
2721 Instruction *ConstantExpr::getAsInstruction() {