• Home
  • Raw
  • Download

Lines Matching refs:ConstantExpr

52     return ConstantExpr::getBitCast(C, DestTy);  in FoldBitCast()
64 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
70 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
92 if (!C) return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
95 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
105 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
131 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
134 Src = ConstantExpr::getZExt(Src, Elt->getType()); in FoldBitCast()
137 Src = ConstantExpr::getShl(Src, in FoldBitCast()
142 Elt = ConstantExpr::getOr(Elt, Src); in FoldBitCast()
155 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
161 Constant *Elt = ConstantExpr::getLShr(Src, in FoldBitCast()
166 Result.push_back(ConstantExpr::getTrunc(Elt, DstEltTy)); in FoldBitCast()
187 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in IsConstantOffsetFromGlobal()
344 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in ReadDataFromGlobal()
430 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ConstantFoldLoadFromConstPtr()
471 Res = ConstantExpr::getBitCast(Res, Ty); in ConstantFoldLoadFromConstPtr()
554 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], in CastGEPIndices()
565 ConstantExpr::getGetElementPtr(Ops[0], &NewIdxs[0], NewIdxs.size()); in CastGEPIndices()
566 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) in CastGEPIndices()
592 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]); in SymbolicallyEvaluateGEP()
597 Constant *Res = ConstantExpr::getPtrToInt(Ptr, CE->getType()); in SymbolicallyEvaluateGEP()
598 Res = ConstantExpr::getSub(Res, CE->getOperand(1)); in SymbolicallyEvaluateGEP()
599 Res = ConstantExpr::getIntToPtr(Res, ResultTy); in SymbolicallyEvaluateGEP()
600 if (ConstantExpr *ResCE = dyn_cast<ConstantExpr>(Res)) in SymbolicallyEvaluateGEP()
638 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) in SymbolicallyEvaluateGEP()
644 return ConstantExpr::getIntToPtr(C, ResultTy); in SymbolicallyEvaluateGEP()
705 ConstantExpr::getGetElementPtr(Ptr, &NewIdxs[0], NewIdxs.size()); in SymbolicallyEvaluateGEP()
770 return ConstantExpr::getInsertValue( in ConstantFoldInstruction()
776 return ConstantExpr::getExtractValue( in ConstantFoldInstruction()
786 Constant *llvm::ConstantFoldConstantExpression(const ConstantExpr *CE, in ConstantFoldConstantExpression()
793 if (ConstantExpr *NewCE = dyn_cast<ConstantExpr>(NewC)) in ConstantFoldConstantExpression()
819 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1])) in ConstantFoldInstOperands()
823 return ConstantExpr::get(Opcode, Ops[0], Ops[1]); in ConstantFoldInstOperands()
838 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { in ConstantFoldInstOperands()
846 Input = ConstantExpr::getAnd(Input, Mask); in ConstantFoldInstOperands()
849 return ConstantExpr::getIntegerCast(Input, DestTy, false); in ConstantFoldInstOperands()
852 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
857 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) in ConstantFoldInstOperands()
863 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
873 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
877 return ConstantExpr::getBitCast(Ops[0], DestTy); in ConstantFoldInstOperands()
879 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
881 return ConstantExpr::getExtractElement(Ops[0], Ops[1]); in ConstantFoldInstOperands()
883 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
885 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
892 return ConstantExpr::getGetElementPtr(Ops[0], Ops.data() + 1, in ConstantFoldInstOperands()
911 if (ConstantExpr *CE0 = dyn_cast<ConstantExpr>(Ops0)) { in ConstantFoldCompareInstOperands()
917 Constant *C = ConstantExpr::getIntegerCast(CE0->getOperand(0), in ConstantFoldCompareInstOperands()
933 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(Ops1)) { in ConstantFoldCompareInstOperands()
940 Constant *C0 = ConstantExpr::getIntegerCast(CE0->getOperand(0), in ConstantFoldCompareInstOperands()
942 Constant *C1 = ConstantExpr::getIntegerCast(CE1->getOperand(0), in ConstantFoldCompareInstOperands()
972 return ConstantExpr::getCompare(Predicate, Ops0, Ops1); in ConstantFoldCompareInstOperands()
980 ConstantExpr *CE) { in ConstantFoldLoadThroughGEPConstantExpr()