• Home
  • Raw
  • Download

Lines Matching refs:ConstantExpr

57     return ConstantExpr::getBitCast(C, DestTy);  in FoldBitCast()
69 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
75 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
97 if (!C) return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
100 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
110 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
136 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
139 Src = ConstantExpr::getZExt(Src, Elt->getType()); in FoldBitCast()
142 Src = ConstantExpr::getShl(Src, in FoldBitCast()
147 Elt = ConstantExpr::getOr(Elt, Src); in FoldBitCast()
160 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
166 Constant *Elt = ConstantExpr::getLShr(Src, in FoldBitCast()
171 Result.push_back(ConstantExpr::getTrunc(Elt, DstEltTy)); in FoldBitCast()
192 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in IsConstantOffsetFromGlobal()
349 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in ReadDataFromGlobal()
435 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ConstantFoldLoadFromConstPtr()
476 Res = ConstantExpr::getBitCast(Res, Ty); in ConstantFoldLoadFromConstPtr()
558 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], in CastGEPIndices()
569 ConstantExpr::getGetElementPtr(Ops[0], NewIdxs); in CastGEPIndices()
570 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) in CastGEPIndices()
596 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]); in SymbolicallyEvaluateGEP()
601 Constant *Res = ConstantExpr::getPtrToInt(Ptr, CE->getType()); in SymbolicallyEvaluateGEP()
602 Res = ConstantExpr::getSub(Res, CE->getOperand(1)); in SymbolicallyEvaluateGEP()
603 Res = ConstantExpr::getIntToPtr(Res, ResultTy); in SymbolicallyEvaluateGEP()
604 if (ConstantExpr *ResCE = dyn_cast<ConstantExpr>(Res)) in SymbolicallyEvaluateGEP()
642 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) in SymbolicallyEvaluateGEP()
648 return ConstantExpr::getIntToPtr(C, ResultTy); in SymbolicallyEvaluateGEP()
709 ConstantExpr::getGetElementPtr(Ptr, NewIdxs); in SymbolicallyEvaluateGEP()
774 return ConstantExpr::getInsertValue( in ConstantFoldInstruction()
780 return ConstantExpr::getExtractValue( in ConstantFoldInstruction()
790 Constant *llvm::ConstantFoldConstantExpression(const ConstantExpr *CE, in ConstantFoldConstantExpression()
797 if (ConstantExpr *NewCE = dyn_cast<ConstantExpr>(NewC)) in ConstantFoldConstantExpression()
823 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1])) in ConstantFoldInstOperands()
827 return ConstantExpr::get(Opcode, Ops[0], Ops[1]); in ConstantFoldInstOperands()
842 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { in ConstantFoldInstOperands()
850 Input = ConstantExpr::getAnd(Input, Mask); in ConstantFoldInstOperands()
853 return ConstantExpr::getIntegerCast(Input, DestTy, false); in ConstantFoldInstOperands()
856 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
861 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) in ConstantFoldInstOperands()
867 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
877 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
881 return ConstantExpr::getBitCast(Ops[0], DestTy); in ConstantFoldInstOperands()
883 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
885 return ConstantExpr::getExtractElement(Ops[0], Ops[1]); in ConstantFoldInstOperands()
887 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
889 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
896 return ConstantExpr::getGetElementPtr(Ops[0], Ops.slice(1)); in ConstantFoldInstOperands()
914 if (ConstantExpr *CE0 = dyn_cast<ConstantExpr>(Ops0)) { in ConstantFoldCompareInstOperands()
920 Constant *C = ConstantExpr::getIntegerCast(CE0->getOperand(0), in ConstantFoldCompareInstOperands()
936 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(Ops1)) { in ConstantFoldCompareInstOperands()
943 Constant *C0 = ConstantExpr::getIntegerCast(CE0->getOperand(0), in ConstantFoldCompareInstOperands()
945 Constant *C1 = ConstantExpr::getIntegerCast(CE1->getOperand(0), in ConstantFoldCompareInstOperands()
975 return ConstantExpr::getCompare(Predicate, Ops0, Ops1); in ConstantFoldCompareInstOperands()
983 ConstantExpr *CE) { in ConstantFoldLoadThroughGEPConstantExpr()