|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
Derived Classes
lib/Bitcode/Reader/ValueList.cpp 36 class ConstantPlaceHolder : public ConstantExpr {
lib/IR/ConstantsContext.h 45 class UnaryConstantExpr : public ConstantExpr {
62 class BinaryConstantExpr : public ConstantExpr {
83 class SelectConstantExpr : public ConstantExpr {
104 class ExtractElementConstantExpr : public ConstantExpr {
125 class InsertElementConstantExpr : public ConstantExpr {
147 class ShuffleVectorConstantExpr : public ConstantExpr {
172 class ExtractValueConstantExpr : public ConstantExpr {
203 class InsertValueConstantExpr : public ConstantExpr {
234 class GetElementPtrConstantExpr : public ConstantExpr {
268 class CompareConstantExpr : public ConstantExpr {
Declarations
include/llvm/Analysis/ConstantFolding.h 27 class ConstantExpr;
include/llvm/Transforms/Scalar/ConstantHoisting.h 55 class ConstantExpr;
lib/ExecutionEngine/Interpreter/Interpreter.h 29 class ConstantExpr;
References
examples/BrainF/BrainF.cpp 95 Constant* allocsize = ConstantExpr::getSizeOf(Int8Ty);
96 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy);
171 Constant *msgptr = ConstantExpr::
include/llvm/ADT/DenseMapInfo.h 39 static inline T* getEmptyKey() {
41 Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
45 static inline T* getTombstoneKey() {
47 Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
51 static unsigned getHashValue(const T *PtrVal) {
56 static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
56 static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/Analysis/ConstantFolding.h 135 Constant *ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE);
include/llvm/Analysis/TargetFolder.h 50 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW));
53 return Fold(ConstantExpr::getFAdd(LHS, RHS));
57 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW));
60 return Fold(ConstantExpr::getFSub(LHS, RHS));
64 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW));
67 return Fold(ConstantExpr::getFMul(LHS, RHS));
70 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact));
73 return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact));
76 return Fold(ConstantExpr::getFDiv(LHS, RHS));
79 return Fold(ConstantExpr::getURem(LHS, RHS));
82 return Fold(ConstantExpr::getSRem(LHS, RHS));
85 return Fold(ConstantExpr::getFRem(LHS, RHS));
89 return Fold(ConstantExpr::getShl(LHS, RHS, HasNUW, HasNSW));
92 return Fold(ConstantExpr::getLShr(LHS, RHS, isExact));
95 return Fold(ConstantExpr::getAShr(LHS, RHS, isExact));
98 return Fold(ConstantExpr::getAnd(LHS, RHS));
101 return Fold(ConstantExpr::getOr(LHS, RHS));
104 return Fold(ConstantExpr::getXor(LHS, RHS));
109 return Fold(ConstantExpr::get(Opc, LHS, RHS));
118 return Fold(ConstantExpr::getNeg(C, HasNUW, HasNSW));
121 return Fold(ConstantExpr::getFNeg(C));
124 return Fold(ConstantExpr::getNot(C));
128 return Fold(ConstantExpr::get(Opc, C));
137 return Fold(ConstantExpr::getGetElementPtr(Ty, C, IdxList));
143 return Fold(ConstantExpr::getGetElementPtr(Ty, C, Idx));
147 return Fold(ConstantExpr::getGetElementPtr(Ty, C, IdxList));
152 return Fold(ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList));
159 return Fold(ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx));
163 return Fold(ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList));
174 return Fold(ConstantExpr::getCast(Op, C, DestTy));
180 return Fold(ConstantExpr::getIntegerCast(C, DestTy, isSigned));
185 return Fold(ConstantExpr::getPointerCast(C, DestTy));
190 return Fold(ConstantExpr::getFPCast(C, DestTy));
204 return Fold(ConstantExpr::getZExtOrBitCast(C, DestTy));
209 return Fold(ConstantExpr::getSExtOrBitCast(C, DestTy));
214 return Fold(ConstantExpr::getTruncOrBitCast(C, DestTy));
221 return Fold(ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy));
230 return Fold(ConstantExpr::getCompare(P, LHS, RHS));
234 return Fold(ConstantExpr::getCompare(P, LHS, RHS));
242 return Fold(ConstantExpr::getSelect(C, True, False));
246 return Fold(ConstantExpr::getExtractElement(Vec, Idx));
251 return Fold(ConstantExpr::getInsertElement(Vec, NewElt, Idx));
256 return Fold(ConstantExpr::getShuffleVector(V1, V2, Mask));
261 return Fold(ConstantExpr::getExtractValue(Agg, IdxList));
266 return Fold(ConstantExpr::getInsertValue(Agg, Val, IdxList));
include/llvm/Analysis/Utils/Local.h 68 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/);
70 ConstantExpr::getMul(OC, Scale, false /*NUW*/, isInBounds /*NSW*/);
include/llvm/Analysis/ValueLattice.h 299 return ConstantExpr::getCompare(Pred, getConstant(), Other.getConstant());
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h 488 Constant *Init = ConstantExpr::getCast(Instruction::IntToPtr,
include/llvm/IR/ConstantFolder.h 37 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW);
41 return ConstantExpr::getFAdd(LHS, RHS);
46 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW);
50 return ConstantExpr::getFSub(LHS, RHS);
55 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW);
59 return ConstantExpr::getFMul(LHS, RHS);
64 return ConstantExpr::getUDiv(LHS, RHS, isExact);
69 return ConstantExpr::getSDiv(LHS, RHS, isExact);
73 return ConstantExpr::getFDiv(LHS, RHS);
77 return ConstantExpr::getURem(LHS, RHS);
81 return ConstantExpr::getSRem(LHS, RHS);
85 return ConstantExpr::getFRem(LHS, RHS);
90 return ConstantExpr::getShl(LHS, RHS, HasNUW, HasNSW);
95 return ConstantExpr::getLShr(LHS, RHS, isExact);
100 return ConstantExpr::getAShr(LHS, RHS, isExact);
104 return ConstantExpr::getAnd(LHS, RHS);
108 return ConstantExpr::getOr(LHS, RHS);
112 return ConstantExpr::getXor(LHS, RHS);
117 return ConstantExpr::get(Opc, LHS, RHS);
126 return ConstantExpr::getNeg(C, HasNUW, HasNSW);
130 return ConstantExpr::getFNeg(C);
134 return ConstantExpr::getNot(C);
138 return ConstantExpr::get(Opc, C);
147 return ConstantExpr::getGetElementPtr(Ty, C, IdxList);
154 return ConstantExpr::getGetElementPtr(Ty, C, Idx);
159 return ConstantExpr::getGetElementPtr(Ty, C, IdxList);
164 return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList);
172 return ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx);
177 return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList);
186 return ConstantExpr::getCast(Op, C, DestTy);
190 return ConstantExpr::getPointerCast(C, DestTy);
195 return ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy);
200 return ConstantExpr::getIntegerCast(C, DestTy, isSigned);
204 return ConstantExpr::getFPCast(C, DestTy);
220 return ConstantExpr::getZExtOrBitCast(C, DestTy);
224 return ConstantExpr::getSExtOrBitCast(C, DestTy);
228 return ConstantExpr::getTruncOrBitCast(C, DestTy);
237 return ConstantExpr::getCompare(P, LHS, RHS);
242 return ConstantExpr::getCompare(P, LHS, RHS);
250 return ConstantExpr::getSelect(C, True, False);
254 return ConstantExpr::getExtractElement(Vec, Idx);
259 return ConstantExpr::getInsertElement(Vec, NewElt, Idx);
264 return ConstantExpr::getShuffleVector(V1, V2, Mask);
269 return ConstantExpr::getExtractValue(Agg, IdxList);
274 return ConstantExpr::getInsertValue(Agg, Val, IdxList);
include/llvm/IR/Constants.h 1270 public VariadicOperandTraits<ConstantExpr, 1> {
include/llvm/IR/IRBuilder.h 1881 return ConstantExpr::getInBoundsGetElementPtr(GV->getValueType(), GV,
2425 ConstantExpr::getSizeOf(ArgType->getElementType()),
include/llvm/IR/NoFolder.h 216 return ConstantExpr::getGetElementPtr(Ty, C, IdxList);
223 return ConstantExpr::getGetElementPtr(Ty, C, Idx);
233 return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList);
241 return ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx);
include/llvm/IR/OperandTraits.h 69 static Use *op_begin(SubClass* U) {
71 !std::is_polymorphic<SubClass>::value,
75 static Use *op_end(SubClass* U) {
include/llvm/IR/Operator.h 43 return cast<ConstantExpr>(this)->getOpcode();
51 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
51 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
57 static bool classof(const ConstantExpr *) { return true; }
59 return isa<Instruction>(V) || isa<ConstantExpr>(V);
105 static bool classof(const ConstantExpr *CE) {
113 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
113 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
146 static bool classof(const ConstantExpr *CE) {
154 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
154 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
376 else if (auto *CE = dyn_cast<ConstantExpr>(V))
412 static bool classof(const ConstantExpr *CE) {
417 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
417 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
include/llvm/IR/PatternMatch.h 749 if (auto *CE = dyn_cast<ConstantExpr>(V))
749 if (auto *CE = dyn_cast<ConstantExpr>(V))
1014 if (auto *CE = dyn_cast<ConstantExpr>(V))
1014 if (auto *CE = dyn_cast<ConstantExpr>(V))
include/llvm/Support/Casting.h 34 using SimpleType = From; // The real type this represents...
37 static SimpleType &getSimplifiedValue(From &Val) { return Val; }
41 using NonConstSimpleType = typename simplify_type<From>::SimpleType;
47 static RetType getSimplifiedValue(const From& Val) {
57 static inline bool doit(const From &Val) {
58 return To::classof(&Val);
66 static inline bool doit(const From &) { return true; }
76 static inline bool doit(const From &Val) {
77 return isa_impl<To, From>::doit(Val);
77 return isa_impl<To, From>::doit(Val);
92 return isa_impl<To, From>::doit(*Val);
104 static inline bool doit(const From *Val) {
106 return isa_impl<To, From>::doit(*Val);
106 return isa_impl<To, From>::doit(*Val);
122 return isa_impl_wrap<To, SimpleFrom,
132 return isa_impl_cl<To,FromTy>::doit(Val);
141 template <class X, class Y> LLVM_NODISCARD inline bool isa(const Y &Val) {
142 return isa_impl_wrap<X, const Y,
142 return isa_impl_wrap<X, const Y,
143 typename simplify_type<const Y>::SimpleType>::doit(Val);
168 using ret_type = const To &; // Normal case, return Ty&
172 using ret_type = To *; // Pointer arg case, return Ty*
176 using ret_type = const To *; // Constant pointer arg case, return const Ty*
198 using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
204 using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
204 using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
218 static typename cast_retty<To, From>::ret_type doit(From &Val) {
219 return cast_convert_val<To, SimpleFrom,
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
228 typename cast_retty<To, FromTy>::ret_type Res2
228 typename cast_retty<To, FromTy>::ret_type Res2
236 std::is_same<X, typename simplify_type<X>::SimpleType>::value;
236 std::is_same<X, typename simplify_type<X>::SimpleType>::value;
248 typename cast_retty<X, const Y>::ret_type>::type
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
258 return cast_convert_val<X, Y,
258 return cast_convert_val<X, Y,
259 typename simplify_type<Y>::SimpleType>::doit(Val);
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
265 return cast_convert_val<X, Y*,
265 return cast_convert_val<X, Y*,
266 typename simplify_type<Y*>::SimpleType>::doit(Val);
331 typename cast_retty<X, const Y>::ret_type>::type
337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
338 return isa<X>(Val) ? cast<X>(Val) : nullptr;
338 return isa<X>(Val) ? cast<X>(Val) : nullptr;
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
343 return isa<X>(Val) ? cast<X>(Val) : nullptr;
343 return isa<X>(Val) ? cast<X>(Val) : nullptr;
366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
368 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
368 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/PointerLikeTypeTraits.h 56 static inline void *getAsVoidPointer(T *P) { return P; }
57 static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
59 enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
91 typedef PointerLikeTypeTraits<T *> NonConst;
93 static inline const void *getAsVoidPointer(const T *P) {
96 static inline const T *getFromVoidPointer(const void *P) {
include/llvm/Support/type_traits.h 55 struct add_const_past_pointer { using type = const T; };
include/llvm/Transforms/Scalar/ConstantHoisting.h 86 ConstantExpr *ConstExpr;
89 ConstantCandidate(ConstantInt *ConstInt, ConstantExpr *ConstExpr=nullptr) :
118 ConstantExpr *BaseExpr;
146 using ConstPtrUnionType = PointerUnion<ConstantInt *, ConstantExpr *>;
180 ConstantExpr *ConstExpr);
lib/Analysis/BranchProbabilityInfo.cpp 552 CmpLHSConst = ConstantExpr::get(I->getOpcode(), CmpLHSConst,
560 Constant *Result = ConstantExpr::getCompare(CI->getPredicate(),
lib/Analysis/CFLGraph.h 182 static bool hasUsefulEdges(ConstantExpr *CE) {
210 } else if (auto CExpr = dyn_cast<ConstantExpr>(Val)) {
509 void visitConstantExpr(ConstantExpr *CE) {
lib/Analysis/CFLSteensAliasAnalysis.cpp 107 isa<ConstantExpr>(Val) ||
lib/Analysis/ConstantFolding.cpp 83 return ConstantExpr::getBitCast(C, DestTy);
119 C = ConstantExpr::getBitCast(C, SrcIVTy);
138 return ConstantExpr::getBitCast(C, DestTy);
149 return ConstantExpr::getBitCast(C, DestTy);
155 return ConstantExpr::getBitCast(C, DestTy);
179 return ConstantExpr::getBitCast(C, DestTy);
189 C = ConstantExpr::getBitCast(C, SrcIVTy);
220 return ConstantExpr::getBitCast(C, DestTy);
223 Src = ConstantExpr::getZExt(Src, Elt->getType());
226 Src = ConstantExpr::getShl(Src,
231 Elt = ConstantExpr::getOr(Elt, Src);
247 return ConstantExpr::getBitCast(C, DestTy);
257 return ConstantExpr::getBitCast(C, DestTy);
263 Constant *Elt = ConstantExpr::getLShr(Src,
271 Constant *CE = ConstantExpr::getTrunc(Elt, DstIntTy);
272 Result.push_back(ConstantExpr::getIntToPtr(CE, DstEltTy));
277 Result.push_back(ConstantExpr::getTrunc(Elt, DstEltTy));
298 auto *CE = dyn_cast<ConstantExpr>(C);
298 auto *CE = dyn_cast<ConstantExpr>(C);
343 return ConstantExpr::getCast(Cast, C, DestTy);
488 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
488 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
540 Res = ConstantExpr::getCast(Instruction::IntToPtr, Res, LoadTy);
604 Constant *ConstantFoldLoadThroughBitcastExpr(ConstantExpr *CE, Type *DestTy,
633 auto *CE = dyn_cast<ConstantExpr>(C);
633 auto *CE = dyn_cast<ConstantExpr>(C);
680 Res = ConstantExpr::getBitCast(Res, Ty);
781 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i],
793 Constant *C = ConstantExpr::getGetElementPtr(
813 Ptr = ConstantExpr::getPointerCast(Ptr, NewPtrTy);
850 auto *CE = dyn_cast<ConstantExpr>(Ops[1]);
850 auto *CE = dyn_cast<ConstantExpr>(Ops[1]);
855 Constant *Res = ConstantExpr::getPtrToInt(Ptr, CE->getType());
856 Res = ConstantExpr::getSub(Res, CE->getOperand(1));
857 Res = ConstantExpr::getIntToPtr(Res, ResTy);
900 if (auto *CE = dyn_cast<ConstantExpr>(Ptr)) {
900 if (auto *CE = dyn_cast<ConstantExpr>(Ptr)) {
911 return ConstantExpr::getIntToPtr(C, ResTy);
997 Constant *C = ConstantExpr::getGetElementPtr(SrcElemTy, Ptr, NewIdxs,
1034 return ConstantExpr::getGetElementPtr(GEP->getSourceElementType(), Ops[0],
1039 if (auto *CE = dyn_cast<ConstantExpr>(InstOrCE))
1054 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]);
1056 return ConstantExpr::getExtractElement(Ops[0], Ops[1]);
1058 return ConstantExpr::getExtractValue(
1061 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]);
1063 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]);
1079 if (!isa<ConstantVector>(C) && !isa<ConstantExpr>(C))
1087 if (isa<ConstantVector>(NewC) || isa<ConstantExpr>(NewC)) {
1104 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1174 return ConstantExpr::getInsertValue(
1181 return ConstantExpr::getExtractValue(
1216 if (auto *CE0 = dyn_cast<ConstantExpr>(Ops0)) {
1216 if (auto *CE0 = dyn_cast<ConstantExpr>(Ops0)) {
1222 Constant *C = ConstantExpr::getIntegerCast(CE0->getOperand(0),
1240 if (auto *CE1 = dyn_cast<ConstantExpr>(Ops1)) {
1240 if (auto *CE1 = dyn_cast<ConstantExpr>(Ops1)) {
1247 Constant *C0 = ConstantExpr::getIntegerCast(CE0->getOperand(0),
1249 Constant *C1 = ConstantExpr::getIntegerCast(CE1->getOperand(0),
1279 } else if (isa<ConstantExpr>(Ops1)) {
1286 return ConstantExpr::getCompare(Predicate, Ops0, Ops1);
1293 return ConstantExpr::get(Opcode, Op);
1300 if (isa<ConstantExpr>(LHS) || isa<ConstantExpr>(RHS))
1300 if (isa<ConstantExpr>(LHS) || isa<ConstantExpr>(RHS))
1304 return ConstantExpr::get(Opcode, LHS, RHS);
1316 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1316 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1325 Input = ConstantExpr::getAnd(Input, Mask);
1328 return ConstantExpr::getIntegerCast(Input, DestTy, false);
1331 return ConstantExpr::getCast(Opcode, C, DestTy);
1337 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1337 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
1351 return ConstantExpr::getCast(Opcode, C, DestTy);
1362 return ConstantExpr::getCast(Opcode, C, DestTy);
1369 ConstantExpr *CE) {
1662 } else if (isa<ConstantAggregate>(c) || isa<ConstantExpr>(c)) {
lib/Analysis/InlineCost.cpp 634 return ConstantExpr::getBitCast(COps[0], I.getType());
658 return ConstantExpr::getPtrToInt(COps[0], I.getType());
691 return ConstantExpr::getIntToPtr(COps[0], I.getType());
717 return ConstantExpr::getCast(I.getOpcode(), COps[0], I.getType());
986 return ConstantExpr::getCompare(I.getPredicate(), COps[0], COps[1]);
1005 if (Constant *C = ConstantExpr::getICmp(I.getPredicate(), CLHS, CRHS)) {
1051 if (Constant *C = ConstantExpr::getSub(CLHS, CRHS)) {
1176 return ConstantExpr::getExtractValue(COps[0], I.getIndices());
1187 return ConstantExpr::getInsertValue(/*AggregateOperand*/ COps[0],
1403 if (auto *C = ConstantExpr::getSelect(CondC, TrueC, FalseC)) {
lib/Analysis/InstructionSimplify.cpp 691 return ConstantExpr::getSub(LHSOffset, RHSOffset);
805 return ConstantExpr::getIntegerCast(Result, Op0->getType(), true);
1825 return ConstantExpr::getCast(Cast0->getOpcode(), C, Cast0->getType());
2350 return ConstantExpr::getICmp(Pred, LHSOffset, RHSOffset);
2422 return ConstantExpr::getICmp(Pred,
2423 ConstantExpr::getAdd(LHSOffset, LHSNoBound),
2424 ConstantExpr::getAdd(RHSOffset, RHSNoBound));
3257 ConstantExpr::getIntToPtr(RHSC, SrcTy),
3285 Constant *Trunc = ConstantExpr::getTrunc(CI, SrcTy);
3286 Constant *RExt = ConstantExpr::getCast(CastInst::ZExt, Trunc, DstTy);
3344 Constant *Trunc = ConstantExpr::getTrunc(CI, SrcTy);
3345 Constant *RExt = ConstantExpr::getCast(CastInst::SExt, Trunc, DstTy);
3443 Constant *NewLHS = ConstantExpr::getGetElementPtr(
3447 Constant *NewRHS = ConstantExpr::getGetElementPtr(
3449 return ConstantExpr::getICmp(Pred, NewLHS, NewRHS);
4078 return ConstantExpr::getIntToPtr(CI, GEPTy);
4084 return ConstantExpr::getIntToPtr(CI, GEPTy);
4093 auto *CE = ConstantExpr::getGetElementPtr(SrcTy, cast<Constant>(Ops[0]),
4893 Constant *C = ConstantExpr::getGetElementPtr(
4894 Int32Ty, ConstantExpr::getBitCast(Ptr, Int32PtrTy),
4900 auto *LoadedCE = dyn_cast<ConstantExpr>(Loaded);
4900 auto *LoadedCE = dyn_cast<ConstantExpr>(Loaded);
4905 LoadedCE = dyn_cast<ConstantExpr>(LoadedCE->getOperand(0));
4913 auto *LoadedLHS = dyn_cast<ConstantExpr>(LoadedCE->getOperand(0));
4913 auto *LoadedLHS = dyn_cast<ConstantExpr>(LoadedCE->getOperand(0));
4926 return ConstantExpr::getBitCast(LoadedLHSPtr, Int8PtrTy);
lib/Analysis/Lint.cpp 701 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
701 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
lib/Analysis/LoopUnrollAnalyzer.cpp 156 ConstantExpr::getCast(I.getOpcode(), COp, I.getType())) {
195 if (Constant *C = ConstantExpr::getCompare(I.getPredicate(), CLHS, CRHS)) {
lib/Analysis/MemoryBuiltins.cpp 603 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
603 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
898 (isa<ConstantExpr>(V) &&
899 cast<ConstantExpr>(V)->getOpcode() == Instruction::IntToPtr) ||
lib/Analysis/PHITransAddr.cpp 198 return AddAsInput(ConstantExpr::getCast(Cast->getOpcode(),
268 RHS = ConstantExpr::getAdd(RHS, CI);
lib/Analysis/ScalarEvolution.cpp 488 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
488 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
490 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
490 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
505 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
505 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
507 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
507 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
530 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
530 if (ConstantExpr *VCE = dyn_cast<ConstantExpr>(getValue()))
532 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
532 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(VCE->getOperand(0)))
1272 cast<ConstantInt>(ConstantExpr::getTrunc(SC->getValue(), Ty)));
1648 cast<ConstantInt>(ConstantExpr::getZExt(SC->getValue(), Ty)));
1954 cast<ConstantInt>(ConstantExpr::getSExt(SC->getValue(), Ty)));
3300 return getConstant(cast<ConstantInt>(ConstantExpr::getUDiv(LHSCV,
3950 cast<ConstantInt>(ConstantExpr::getNeg(VC->getValue())));
3977 cast<ConstantInt>(ConstantExpr::getNot(VC->getValue())));
5967 if (isa<ConstantExpr>(V)) return SCEV::FlagAnyWrap;
6151 else if (!isa<ConstantExpr>(V))
7556 Result = ConstantExpr::getICmp(predicate, Result, RHS);
8060 return ConstantExpr::getSExt(CastOp, SS->getType());
8066 return ConstantExpr::getZExt(CastOp, SZ->getType());
8072 return ConstantExpr::getTrunc(CastOp, ST->getType());
8081 C = ConstantExpr::getBitCast(C, DestPtrTy);
8094 C = ConstantExpr::getBitCast(C, DestPtrTy);
8104 C2 = ConstantExpr::getIntegerCast(
8106 C = ConstantExpr::getGetElementPtr(PTy->getElementType(), C, C2);
8108 C = ConstantExpr::getAdd(C, C2);
8122 C = ConstantExpr::getMul(C, C2);
8133 return ConstantExpr::getUDiv(LHS, RHS);
8237 C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false,
8913 if (ConstantExpr::getICmp(Pred,
lib/Analysis/ScalarEvolutionExpander.cpp 136 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
136 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
146 return ConstantExpr::getCast(Op, C, Ty);
175 return ConstantExpr::get(Opcode, CLHS, CRHS);
520 return ConstantExpr::getGetElementPtr(Type::getInt8Ty(Ty->getContext()),
lib/Analysis/ValueTracking.cpp 2008 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
2685 ConstantExpr *CO = dyn_cast<ConstantExpr>(V);
2685 ConstantExpr *CO = dyn_cast<ConstantExpr>(V);
2734 Op1C = ConstantExpr::getZExt(Op1C, MulC->getType());
2737 MulC = ConstantExpr::getZExt(MulC, Op1C->getType());
2740 Multiple = ConstantExpr::getMul(MulC, Op1C);
2758 Op0C = ConstantExpr::getZExt(Op0C, MulC->getType());
2761 MulC = ConstantExpr::getZExt(MulC, Op0C->getType());
2764 Multiple = ConstantExpr::getMul(MulC, Op0C);
3229 return Ty ? isBytewiseValue(ConstantExpr::getBitCast(CFP, Ty), DL)
3243 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
3243 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
3248 ConstantExpr::getIntegerCast(CE->getOperand(0),
4981 CastedTo = ConstantExpr::getTrunc(C, SrcTy);
4985 CastedTo = ConstantExpr::getTrunc(C, SrcTy, true);
5014 CastedTo = ConstantExpr::getIntegerCast(C, SrcTy, CmpI->isSigned());
5018 CastedTo = ConstantExpr::getFPExtend(C, SrcTy, true);
5021 CastedTo = ConstantExpr::getFPTrunc(C, SrcTy, true);
5024 CastedTo = ConstantExpr::getUIToFP(C, SrcTy, true);
5027 CastedTo = ConstantExpr::getSIToFP(C, SrcTy, true);
5030 CastedTo = ConstantExpr::getFPToUI(C, SrcTy, true);
5033 CastedTo = ConstantExpr::getFPToSI(C, SrcTy, true);
5044 ConstantExpr::getCast(*CastOp, CastedTo, C->getType(), true);
lib/AsmParser/LLParser.cpp 3333 ID.ConstantVal = ConstantExpr::getCast((Instruction::CastOps)Opc,
3352 ID.ConstantVal = ConstantExpr::getExtractValue(Val, Indices);
3378 ID.ConstantVal = ConstantExpr::getInsertValue(Val0, Val1, Indices);
3403 ID.ConstantVal = ConstantExpr::getFCmp(Pred, Val0, Val1);
3409 ID.ConstantVal = ConstantExpr::getICmp(Pred, Val0, Val1);
3434 Constant *C = ConstantExpr::get(Opc, Val, Flags);
3512 Constant *C = ConstantExpr::get(Opc, Val0, Val1, Flags);
3536 ID.ConstantVal = ConstantExpr::get(Opc, Val0, Val1);
3617 ID.ConstantVal = ConstantExpr::getGetElementPtr(Ty, Elts[0], Indices,
3625 ID.ConstantVal = ConstantExpr::getSelect(Elts[0], Elts[1], Elts[2]);
3632 ConstantExpr::getShuffleVector(Elts[0], Elts[1],Elts[2]);
3638 ID.ConstantVal = ConstantExpr::getExtractElement(Elts[0], Elts[1]);
3646 ConstantExpr::getInsertElement(Elts[0], Elts[1],Elts[2]);
lib/Bitcode/Reader/BitcodeReader.cpp 2527 V = ConstantExpr::get(Opc, LHS, Flags);
2558 V = ConstantExpr::get(Opc, LHS, RHS, Flags);
2574 if (!V) V = ConstantExpr::getCast(Opc, Op, CurTy);
2620 V = ConstantExpr::getGetElementPtr(PointeeType, Elts[0], Indices,
2637 V = ConstantExpr::getSelect(ValueList.getConstantFwdRef(Record[0],
2662 V = ConstantExpr::getExtractElement(Op0, Op1);
2683 V = ConstantExpr::getInsertElement(Op0, Op1, Op2);
2695 V = ConstantExpr::getShuffleVector(Op0, Op1, Op2);
2709 V = ConstantExpr::getShuffleVector(Op0, Op1, Op2);
2722 V = ConstantExpr::getFCmp(Record[3], Op0, Op1);
2724 V = ConstantExpr::getICmp(Record[3], Op0, Op1);
lib/Bitcode/Reader/ValueList.cpp 36 class ConstantPlaceHolder : public ConstantExpr {
50 return isa<ConstantExpr>(V) &&
51 cast<ConstantExpr>(V)->getOpcode() == Instruction::UserOp1;
213 NewC = cast<ConstantExpr>(UserC)->getWithOperands(NewOps);
lib/Bitcode/Writer/BitcodeWriter.cpp 2427 } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
2427 } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
lib/CodeGen/AsmPrinter/AsmPrinter.cpp 1317 if (auto *CE = dyn_cast<ConstantExpr>(GIS.getIndirectSymbol()))
2180 const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV);
2180 const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV);
2232 Op = ConstantExpr::getIntegerCast(Op, DL.getIntPtrType(CV->getType()),
2716 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
2716 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
lib/CodeGen/CodeGenPrepare.cpp 1202 Arg1 = ConstantExpr::getNeg(cast<Constant>(Arg1));
4351 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Addr)) {
4351 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Addr)) {
lib/CodeGen/GlobalISel/IRTranslator.cpp 344 cast<ConstantExpr>(U).getPredicate());
2148 } else if (auto CE = dyn_cast<ConstantExpr>(&C)) {
lib/CodeGen/GlobalMerge.cpp 311 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U.getUser())) {
311 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U.getUser())) {
539 ConstantExpr::getInBoundsGetElementPtr(MergedTy, MergedGV, Idx);
lib/CodeGen/IndirectBrExpandPass.cpp 154 BA->replaceAllUsesWith(ConstantExpr::getIntToPtr(BBIndexC, BA->getType()));
lib/CodeGen/SelectionDAG/FastISel.cpp 964 } else if (const auto *C = dyn_cast<ConstantExpr>(Callee)) {
964 } else if (const auto *C = dyn_cast<ConstantExpr>(Callee)) {
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp 434 if (isa<UndefValue>(V) || isa<ConstantExpr>(V)) {
467 if (isa<UndefValue>(V) || isa<ConstantExpr>(V)) {
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp 322 LLVMC = cast<ConstantFP>(ConstantExpr::getFPTrunc(LLVMC, SType));
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 1464 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
1464 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
3200 else if (const ConstantExpr *IC = dyn_cast<ConstantExpr>(&I))
3200 else if (const ConstantExpr *IC = dyn_cast<ConstantExpr>(&I))
3227 else if (const ConstantExpr *FC = dyn_cast<ConstantExpr>(&I))
3227 else if (const ConstantExpr *FC = dyn_cast<ConstantExpr>(&I))
3745 Indices = cast<ConstantExpr>(&I)->getIndices();
3799 Indices = cast<ConstantExpr>(&I)->getIndices();
7209 LoadInput = ConstantExpr::getBitCast(const_cast<Constant *>(LoadInput),
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp 368 ConstantExpr *CE = dyn_cast<ConstantExpr>(PN->getIncomingValue(i));
368 ConstantExpr *CE = dyn_cast<ConstantExpr>(PN->getIncomingValue(i));
lib/CodeGen/ShadowStackGCLowering.cpp 112 Metadata.push_back(ConstantExpr::getBitCast(C, VoidPtr));
152 return ConstantExpr::getGetElementPtr(FrameMap->getType(), GV, GEPIndices);
lib/ExecutionEngine/ExecutionEngine.cpp 395 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
395 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
643 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
643 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
lib/ExecutionEngine/Interpreter/Execution.cpp 2021 GenericValue Interpreter::getConstantExprValue (ConstantExpr *CE,
2105 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
2105 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
lib/ExecutionEngine/Interpreter/Interpreter.h 201 GenericValue getConstantExprValue(ConstantExpr *CE, ExecutionContext &SF);
lib/ExecutionEngine/Orc/ExecutionUtils.cpp 60 } else if (ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>(FuncC)) {
60 } else if (ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>(FuncC)) {
62 FuncC = dyn_cast_or_null<ConstantExpr>(CE->getOperand(0));
lib/ExecutionEngine/Orc/IndirectionUtils.cpp 223 ConstantExpr::getCast(Instruction::IntToPtr, AddrIntVal,
lib/IR/AbstractCallSite.cpp 46 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U->getUser()))
46 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U->getUser()))
lib/IR/AsmWriter.cpp 1507 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
1507 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
3351 writeOperand(IS, !isa<ConstantExpr>(IS));
lib/IR/AutoUpgrade.cpp 3800 return ConstantExpr::getIntToPtr(ConstantExpr::getPtrToInt(C, MidTy),
3800 return ConstantExpr::getIntToPtr(ConstantExpr::getPtrToInt(C, MidTy),
lib/IR/BasicBlock.cpp 76 BA->replaceAllUsesWith(ConstantExpr::getIntToPtr(Replacement,
lib/IR/ConstantFold.cpp 63 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i));
64 C = ConstantExpr::getBitCast(C, DstEltTy);
78 ConstantExpr *Op, ///< the first cast constant expression
133 return ConstantExpr::getInBoundsGetElementPtr(PTy->getElementType(),
156 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy);
233 ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
233 ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
251 return ConstantExpr::getOr(LHS, RHS);
265 return ConstantExpr::getAnd(LHS, RHS);
337 Res = ConstantExpr::getLShr(Res,
339 return ConstantExpr::getTrunc(Res, IntegerType::get(C->getContext(),
357 return ConstantExpr::getNUWMul(E, N);
365 return ConstantExpr::getNullValue(DestTy);
378 return ConstantExpr::getNUWMul(MemberSize, N);
397 Constant *C = ConstantExpr::getSizeOf(Ty);
398 C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false,
412 Constant *C = ConstantExpr::getAlignOf(ATy->getElementType());
413 C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false,
461 Constant *C = ConstantExpr::getAlignOf(Ty);
462 C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false,
475 Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo, false,
479 return ConstantExpr::getNUWMul(E, N);
499 Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo,
504 return ConstantExpr::getNUWMul(MemberSize, N);
514 Constant *C = ConstantExpr::getOffsetOf(Ty, FieldNo);
515 C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false,
539 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
539 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
543 return ConstantExpr::getCast(newOpc, CE->getOperand(0), DestTy);
565 return ConstantExpr::getPointerCast(CE->getOperand(0), DestTy);
581 ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i));
582 res.push_back(ConstantExpr::getCast(opc, C, DstEltTy));
635 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
635 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
654 Idx = ConstantExpr::getCast(CastInst::getCastOpcode(Idx, true,
657 return ConstantExpr::getMul(C, Idx);
745 Constant *V1Element = ConstantExpr::getExtractElement(V1,
747 Constant *V2Element = ConstantExpr::getExtractElement(V2,
774 if (ConstantExpr *TrueVal = dyn_cast<ConstantExpr>(V1)) {
774 if (ConstantExpr *TrueVal = dyn_cast<ConstantExpr>(V1)) {
777 return ConstantExpr::getSelect(Cond, TrueVal->getOperand(1), V2);
779 if (ConstantExpr *FalseVal = dyn_cast<ConstantExpr>(V2)) {
779 if (ConstantExpr *FalseVal = dyn_cast<ConstantExpr>(V2)) {
782 return ConstantExpr::getSelect(Cond, V1, FalseVal->getOperand(2));
804 if (auto *CE = dyn_cast<ConstantExpr>(Val)) {
804 if (auto *CE = dyn_cast<ConstantExpr>(Val)) {
850 Constant *C = ConstantExpr::getExtractElement(Val, ConstantInt::get(Ty, i));
868 if (isa<ConstantExpr>(Mask)) return nullptr;
886 ConstantExpr::getExtractElement(V2,
890 InElt = ConstantExpr::getExtractElement(V1, ConstantInt::get(Ty, Elt));
975 Constant *Elt = ConstantExpr::getExtractElement(C, ExtractIdx);
977 Result.push_back(ConstantExpr::get(Opcode, Elt));
1132 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1132 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1192 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1192 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1201 return ConstantExpr::getCompare(pred, CE1->getOperand(0),
1208 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1))
1208 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1))
1210 return ConstantExpr::getLShr(C1, C2);
1216 return ConstantExpr::get(Opcode, C2, C1);
1313 Constant *LHS = ConstantExpr::getExtractElement(C1, ExtractIdx);
1314 Constant *RHS = ConstantExpr::getExtractElement(C2, ExtractIdx);
1320 Result.push_back(ConstantExpr::get(Opcode, LHS, RHS));
1326 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1326 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
1334 Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2);
1335 if (!isa<ConstantExpr>(T) || cast<ConstantExpr>(T)->getOpcode() != Opcode)
1335 if (!isa<ConstantExpr>(T) || cast<ConstantExpr>(T)->getOpcode() != Opcode)
1336 return ConstantExpr::get(Opcode, CE1->getOperand(0), T);
1338 } else if (isa<ConstantExpr>(C2)) {
1350 return ConstantExpr::getXor(C1, C2);
1352 return ConstantExpr::getAnd(C1, C2);
1454 if (!isa<ConstantExpr>(V1)) {
1455 if (!isa<ConstantExpr>(V2)) {
1459 ConstantExpr::getFCmp(FCmpInst::FCMP_OEQ, V1, V2));
1463 ConstantExpr::getFCmp(FCmpInst::FCMP_OLT, V1, V2));
1467 ConstantExpr::getFCmp(FCmpInst::FCMP_OGT, V1, V2));
1482 ConstantExpr *CE1 = cast<ConstantExpr>(V1);
1482 ConstantExpr *CE1 = cast<ConstantExpr>(V1);
1541 if (!isa<ConstantExpr>(V1) && !isa<GlobalValue>(V1) &&
1543 if (!isa<GlobalValue>(V2) && !isa<ConstantExpr>(V2) &&
1549 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1553 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1557 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2));
1572 if (isa<ConstantExpr>(V2)) { // Swap as necessary.
1600 if (isa<ConstantExpr>(V2)) { // Swap as necessary.
1626 ConstantExpr *CE1 = cast<ConstantExpr>(V1);
1626 ConstantExpr *CE1 = cast<ConstantExpr>(V1);
1711 ConstantExpr *CE2 = cast<ConstantExpr>(V2);
1711 ConstantExpr *CE2 = cast<ConstantExpr>(V2);
1852 return ConstantExpr::getXor(C1, ConstantExpr::getNot(C2));
1852 return ConstantExpr::getXor(C1, ConstantExpr::getNot(C2));
1853 return ConstantExpr::getXor(ConstantExpr::getNot(C1), C2);
1853 return ConstantExpr::getXor(ConstantExpr::getNot(C1), C2);
1855 return ConstantExpr::getXor(C1, C2);
1928 ConstantExpr::getExtractElement(C1, ConstantInt::get(Ty, i));
1930 ConstantExpr::getExtractElement(C2, ConstantInt::get(Ty, i));
1932 ResElts.push_back(ConstantExpr::getCompare(pred, C1E, C2E));
1941 (isa<ConstantExpr>(C1) || isa<ConstantExpr>(C2))) {
1941 (isa<ConstantExpr>(C1) || isa<ConstantExpr>(C2))) {
2080 if (ConstantExpr *CE2 = dyn_cast<ConstantExpr>(C2)) {
2080 if (ConstantExpr *CE2 = dyn_cast<ConstantExpr>(C2)) {
2085 Constant *Inverse = ConstantExpr::getBitCast(C1, CE2Op0->getType());
2086 return ConstantExpr::getICmp(pred, Inverse, CE2Op0);
2091 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
2091 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) {
2097 Constant *CE1Inverse = ConstantExpr::getTrunc(CE1, CE1Op0->getType());
2100 Constant *C2Inverse = ConstantExpr::getTrunc(C2, CE1Op0->getType());
2101 if (ConstantExpr::getCast(CE1->getOpcode(), C2Inverse,
2103 return ConstantExpr::getICmp(pred, CE1Inverse, C2Inverse);
2108 if ((!isa<ConstantExpr>(C1) && isa<ConstantExpr>(C2)) ||
2108 if ((!isa<ConstantExpr>(C1) && isa<ConstantExpr>(C2)) ||
2114 return ConstantExpr::getICmp(pred, C2, C1);
2214 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
2214 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
2275 Constant *C1 = ConstantExpr::getSExtOrBitCast(Idx0, CommonTy);
2276 Constant *C2 = ConstantExpr::getSExtOrBitCast(Combined, CommonTy);
2277 Combined = ConstantExpr::get(Instruction::Add, C1, C2);
2280 ConstantExpr::get(Instruction::Add, Idx0, Combined);
2294 return ConstantExpr::getGetElementPtr(
2322 return ConstantExpr::getGetElementPtr(SrcArrayTy,
2425 NewIdxs[i] = ConstantExpr::getSRem(CurrIdx, Factor);
2427 Constant *Div = ConstantExpr::getSDiv(CurrIdx, Factor);
2444 PrevIdx = ConstantExpr::getSExt(PrevIdx, ExtendedTy);
2447 Div = ConstantExpr::getSExt(Div, ExtendedTy);
2449 NewIdxs[i - 1] = ConstantExpr::getAdd(PrevIdx, Div);
2456 return ConstantExpr::getGetElementPtr(PointeeTy, C, NewIdxs, InBounds,
2465 return ConstantExpr::getGetElementPtr(PointeeTy, C, Idxs,
lib/IR/Constants.cpp 262 return PatternMatch::match(ConstantExpr::getICmp(ICmpInst::Predicate::ICMP_EQ,
282 if (isa<ConstantExpr>(getAggregateElement(i)))
334 C = ConstantExpr::getIntToPtr(C, PTy);
427 SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) {
430 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
430 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
436 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) {
436 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) {
458 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps;
520 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) {
520 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) {
522 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0));
522 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0));
523 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1));
523 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1));
1260 return ConstantExpr::getCast(getOpcode(), Ops[0], Ty, OnlyIfReduced);
1262 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2], OnlyIfReducedTy);
1264 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2],
1267 return ConstantExpr::getExtractElement(Ops[0], Ops[1], OnlyIfReducedTy);
1269 return ConstantExpr::getInsertValue(Ops[0], Ops[1], getIndices(),
1272 return ConstantExpr::getExtractValue(Ops[0], getIndices(), OnlyIfReducedTy);
1274 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2],
1279 return ConstantExpr::getGetElementPtr(
1285 return ConstantExpr::getCompare(getPredicate(), Ops[0], Ops[1],
1289 return ConstantExpr::get(getOpcode(), Ops[0], Ops[1], SubclassOptionalData,
lib/IR/ConstantsContext.h 45 class UnaryConstantExpr : public ConstantExpr {
62 class BinaryConstantExpr : public ConstantExpr {
83 class SelectConstantExpr : public ConstantExpr {
104 class ExtractElementConstantExpr : public ConstantExpr {
125 class InsertElementConstantExpr : public ConstantExpr {
147 class ShuffleVectorConstantExpr : public ConstantExpr {
172 class ExtractValueConstantExpr : public ConstantExpr {
192 static bool classof(const ConstantExpr *CE) {
196 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
196 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
203 class InsertValueConstantExpr : public ConstantExpr {
224 static bool classof(const ConstantExpr *CE) {
228 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
228 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
234 class GetElementPtrConstantExpr : public ConstantExpr {
257 static bool classof(const ConstantExpr *CE) {
261 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
261 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
268 class CompareConstantExpr : public ConstantExpr {
286 static bool classof(const ConstantExpr *CE) {
291 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
291 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V));
479 ConstantExprKeyType(ArrayRef<Constant *> Operands, const ConstantExpr *CE)
486 ConstantExprKeyType(const ConstantExpr *CE,
505 bool operator==(const ConstantExpr *CE) const {
528 using TypeClass = ConstantInfo<ConstantExpr>::TypeClass;
530 ConstantExpr *create(TypeClass *Ty) const {
572 using ValType = typename ConstantInfo<ConstantClass>::ValType;
573 using TypeClass = typename ConstantInfo<ConstantClass>::TypeClass;
581 using ConstantClassInfo = DenseMapInfo<ConstantClass *>;
583 static inline ConstantClass *getEmptyKey() {
587 static inline ConstantClass *getTombstoneKey() {
591 static unsigned getHashValue(const ConstantClass *CP) {
596 static bool isEqual(const ConstantClass *LHS, const ConstantClass *RHS) {
596 static bool isEqual(const ConstantClass *LHS, const ConstantClass *RHS) {
608 static bool isEqual(const LookupKey &LHS, const ConstantClass *RHS) {
616 static bool isEqual(const LookupKeyHashed &LHS, const ConstantClass *RHS) {
622 using MapTy = DenseSet<ConstantClass *, MapInfo>;
637 ConstantClass *create(TypeClass *Ty, ValType V, LookupKeyHashed &HashKey) {
638 ConstantClass *Result = V.create(Ty);
648 ConstantClass *getOrCreate(TypeClass *Ty, ValType V) {
653 ConstantClass *Result = nullptr;
666 void remove(ConstantClass *CP) {
673 ConstantClass *replaceOperandsInPlace(ArrayRef<Constant *> Operands,
674 ConstantClass *CP, Value *From,
lib/IR/Core.cpp 1456 return map_to_llvmopcode(unwrap<ConstantExpr>(ConstantVal)->getOpcode());
1460 return wrap(ConstantExpr::getAlignOf(unwrap(Ty)));
1464 return wrap(ConstantExpr::getSizeOf(unwrap(Ty)));
1468 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal)));
1472 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal)));
1476 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal)));
1481 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal)));
1485 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal)));
1489 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant),
1495 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant),
1501 return wrap(ConstantExpr::getNUWAdd(unwrap<Constant>(LHSConstant),
1506 return wrap(ConstantExpr::getFAdd(unwrap<Constant>(LHSConstant),
1511 return wrap(ConstantExpr::getSub(unwrap<Constant>(LHSConstant),
1517 return wrap(ConstantExpr::getNSWSub(unwrap<Constant>(LHSConstant),
1523 return wrap(ConstantExpr::getNUWSub(unwrap<Constant>(LHSConstant),
1528 return wrap(ConstantExpr::getFSub(unwrap<Constant>(LHSConstant),
1533 return wrap(ConstantExpr::getMul(unwrap<Constant>(LHSConstant),
1539 return wrap(ConstantExpr::getNSWMul(unwrap<Constant>(LHSConstant),
1545 return wrap(ConstantExpr::getNUWMul(unwrap<Constant>(LHSConstant),
1550 return wrap(ConstantExpr::getFMul(unwrap<Constant>(LHSConstant),
1555 return wrap(ConstantExpr::getUDiv(unwrap<Constant>(LHSConstant),
1561 return wrap(ConstantExpr::getExactUDiv(unwrap<Constant>(LHSConstant),
1566 return wrap(ConstantExpr::getSDiv(unwrap<Constant>(LHSConstant),
1572 return wrap(ConstantExpr::getExactSDiv(unwrap<Constant>(LHSConstant),
1577 return wrap(ConstantExpr::getFDiv(unwrap<Constant>(LHSConstant),
1582 return wrap(ConstantExpr::getURem(unwrap<Constant>(LHSConstant),
1587 return wrap(ConstantExpr::getSRem(unwrap<Constant>(LHSConstant),
1592 return wrap(ConstantExpr::getFRem(unwrap<Constant>(LHSConstant),
1597 return wrap(ConstantExpr::getAnd(unwrap<Constant>(LHSConstant),
1602 return wrap(ConstantExpr::getOr(unwrap<Constant>(LHSConstant),
1607 return wrap(ConstantExpr::getXor(unwrap<Constant>(LHSConstant),
1613 return wrap(ConstantExpr::getICmp(Predicate,
1620 return wrap(ConstantExpr::getFCmp(Predicate,
1626 return wrap(ConstantExpr::getShl(unwrap<Constant>(LHSConstant),
1631 return wrap(ConstantExpr::getLShr(unwrap<Constant>(LHSConstant),
1636 return wrap(ConstantExpr::getAShr(unwrap<Constant>(LHSConstant),
1647 return wrap(ConstantExpr::getGetElementPtr(Ty, Val, IdxList));
1658 return wrap(ConstantExpr::getInBoundsGetElementPtr(Ty, Val, IdxList));
1662 return wrap(ConstantExpr::getTrunc(unwrap<Constant>(ConstantVal),
1667 return wrap(ConstantExpr::getSExt(unwrap<Constant>(ConstantVal),
1672 return wrap(ConstantExpr::getZExt(unwrap<Constant>(ConstantVal),
1677 return wrap(ConstantExpr::getFPTrunc(unwrap<Constant>(ConstantVal),
1682 return wrap(ConstantExpr::getFPExtend(unwrap<Constant>(ConstantVal),
1687 return wrap(ConstantExpr::getUIToFP(unwrap<Constant>(ConstantVal),
1692 return wrap(ConstantExpr::getSIToFP(unwrap<Constant>(ConstantVal),
1697 return wrap(ConstantExpr::getFPToUI(unwrap<Constant>(ConstantVal),
1702 return wrap(ConstantExpr::getFPToSI(unwrap<Constant>(ConstantVal),
1707 return wrap(ConstantExpr::getPtrToInt(unwrap<Constant>(ConstantVal),
1712 return wrap(ConstantExpr::getIntToPtr(unwrap<Constant>(ConstantVal),
1717 return wrap(ConstantExpr::getBitCast(unwrap<Constant>(ConstantVal),
1723 return wrap(ConstantExpr::getAddrSpaceCast(unwrap<Constant>(ConstantVal),
1729 return wrap(ConstantExpr::getZExtOrBitCast(unwrap<Constant>(ConstantVal),
1735 return wrap(ConstantExpr::getSExtOrBitCast(unwrap<Constant>(ConstantVal),
1741 return wrap(ConstantExpr::getTruncOrBitCast(unwrap<Constant>(ConstantVal),
1747 return wrap(ConstantExpr::getPointerCast(unwrap<Constant>(ConstantVal),
1753 return wrap(ConstantExpr::getIntegerCast(unwrap<Constant>(ConstantVal),
1758 return wrap(ConstantExpr::getFPCast(unwrap<Constant>(ConstantVal),
1765 return wrap(ConstantExpr::getSelect(unwrap<Constant>(ConstantCondition),
1772 return wrap(ConstantExpr::getExtractElement(unwrap<Constant>(VectorConstant),
1779 return wrap(ConstantExpr::getInsertElement(unwrap<Constant>(VectorConstant),
1787 return wrap(ConstantExpr::getShuffleVector(unwrap<Constant>(VectorAConstant),
1794 return wrap(ConstantExpr::getExtractValue(unwrap<Constant>(AggConstant),
1801 return wrap(ConstantExpr::getInsertValue(unwrap<Constant>(AggConstant),
2738 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
2738 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
2747 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
2747 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
2966 if (auto *CE = dyn_cast<ConstantExpr>(I))
2966 if (auto *CE = dyn_cast<ConstantExpr>(I))
2978 if (auto *CE = dyn_cast<ConstantExpr>(I))
2978 if (auto *CE = dyn_cast<ConstantExpr>(I))
3423 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty));
3424 AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, ITy);
3434 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty));
3435 AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, ITy);
lib/IR/Globals.cpp 441 if (auto *CE = dyn_cast<ConstantExpr>(C)) {
lib/IR/Instructions.cpp 550 Constant *Scale = ConstantExpr::getIntegerCast(CO, IntPtrTy,
553 AllocSize = ConstantExpr::getMul(Scale, cast<Constant>(AllocSize));
1883 if (const auto *CE = dyn_cast<ConstantExpr>(Mask))
1883 if (const auto *CE = dyn_cast<ConstantExpr>(Mask))
lib/IR/LLVMContextImpl.cpp 82 for (auto *I : ExprConstants)
lib/IR/LLVMContextImpl.h 1310 ConstantUniqueMap<ConstantExpr> ExprConstants;
lib/IR/Module.cpp 161 return {Ty, ConstantExpr::getBitCast(F, PTy)};
218 return ConstantExpr::getBitCast(GV, PTy);
lib/IR/Value.cpp 364 static bool contains(SmallPtrSetImpl<ConstantExpr *> &Cache, ConstantExpr *Expr,
364 static bool contains(SmallPtrSetImpl<ConstantExpr *> &Cache, ConstantExpr *Expr,
372 auto *CE = dyn_cast<ConstantExpr>(O);
372 auto *CE = dyn_cast<ConstantExpr>(O);
389 auto *CE = dyn_cast<ConstantExpr>(Expr);
389 auto *CE = dyn_cast<ConstantExpr>(Expr);
393 SmallPtrSet<ConstantExpr *, 4> Cache;
lib/IR/Verifier.cpp 510 void visitConstantExpr(const ConstantExpr *CE);
740 if (const auto *CE = dyn_cast<ConstantExpr>(&C))
740 if (const auto *CE = dyn_cast<ConstantExpr>(&C))
1888 if (const auto *CE = dyn_cast<ConstantExpr>(C))
1888 if (const auto *CE = dyn_cast<ConstantExpr>(C))
1911 void Verifier::visitConstantExpr(const ConstantExpr *CE) {
4147 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(I.getOperand(i))) {
4147 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(I.getOperand(i))) {
lib/LTO/LTO.cpp 975 OldGV->replaceAllUsesWith(ConstantExpr::getBitCast(GV, OldGV->getType()));
lib/LTO/LTOModule.cpp 248 if (const ConstantExpr *ce = dyn_cast<ConstantExpr>(c)) {
248 if (const ConstantExpr *ce = dyn_cast<ConstantExpr>(c)) {
lib/Linker/IRMover.cpp 926 Constant *Ret = ConstantExpr::getBitCast(NG, TypeMap.get(SrcGV->getType()));
936 std::make_pair(DstGV, ConstantExpr::getBitCast(NG, DstGV->getType())));
1030 C = ConstantExpr::getPointerBitCastOrAddrSpaceCast(
1040 ConstantExpr::getPointerBitCastOrAddrSpaceCast(NewGV, DGV->getType())));
lib/Target/AArch64/AArch64FastISel.cpp 591 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
591 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
937 } else if (const auto *C = dyn_cast<ConstantExpr>(V)) {
937 } else if (const auto *C = dyn_cast<ConstantExpr>(V)) {
lib/Target/AArch64/AArch64PromoteConstant.cpp 554 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst))
lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp 71 static bool visitConstantExpr(const ConstantExpr *CE);
96 bool AMDGPUAnnotateKernelFeatures::visitConstantExpr(const ConstantExpr *CE) {
119 if (const auto *CE = dyn_cast<ConstantExpr>(C)) {
119 if (const auto *CE = dyn_cast<ConstantExpr>(C)) {
lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp 203 SI->replaceAllUsesWith(ConstantExpr::getIntegerCast(KnownSize,
227 ConstantExpr::getIntegerCast(KnownSize,
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp 234 auto *CE = dyn_cast<ConstantExpr>(CV);
lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp 131 if (!isa<ConstantExpr>(UU))
134 auto *BitCast = cast<ConstantExpr>(UU);
134 auto *BitCast = cast<ConstantExpr>(UU);
135 auto *NewPtr = ConstantExpr::getPointerCast(GV, BitCast->getType());
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp 179 ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Op);
179 ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Op);
250 if (ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Arg)) {
250 if (ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Arg)) {
436 if (ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Arg)) {
436 if (ConstantExpr *ConstExpr = dyn_cast<ConstantExpr>(Arg)) {
lib/Target/ARM/ARMCodeGenPrepare.cpp 562 Constant *NewConst = ConstantExpr::getZExt(Const, ExtTy);
841 } else if (isa<Constant>(V) && !isa<ConstantExpr>(V)) {
lib/Target/ARM/ARMFastISel.cpp 725 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
725 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
lib/Target/ARM/ARMISelLowering.cpp 3304 if (isa<ConstantExpr>(U)) {
lib/Target/Mips/MipsFastISel.cpp 476 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
476 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
557 } else if (const auto *C = dyn_cast<ConstantExpr>(V)) {
557 } else if (const auto *C = dyn_cast<ConstantExpr>(V)) {
lib/Target/NVPTX/NVPTXAsmPrinter.cpp 1738 if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1738 if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1817 } else if (const auto *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1817 } else if (const auto *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1839 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1839 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1885 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1885 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) {
1990 const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV);
1990 const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV);
2060 Op = ConstantExpr::getIntegerCast(Op, DL.getIntPtrType(CV->getType()),
lib/Target/NVPTX/NVPTXAsmPrinter.h 175 } else if (const ConstantExpr *CExpr = dyn_cast<ConstantExpr>(v0)) {
175 } else if (const ConstantExpr *CExpr = dyn_cast<ConstantExpr>(v0)) {
lib/Target/NVPTX/NVPTXGenericToNVVM.cpp 52 Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
142 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType());
184 } else if (isa<ConstantExpr>(C)) {
188 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder);
234 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
lib/Target/NVPTX/NVPTXISelLowering.cpp 1396 while (isa<ConstantExpr>(CalleeV)) {
1397 const ConstantExpr *CE = cast<ConstantExpr>(CalleeV);
1397 const ConstantExpr *CE = cast<ConstantExpr>(CalleeV);
1401 CalleeV = cast<ConstantExpr>(CalleeV)->getOperand(0);
lib/Target/NVPTX/NVVMReflect.cpp 136 const ConstantExpr *GEP = cast<ConstantExpr>(Str);
136 const ConstantExpr *GEP = cast<ConstantExpr>(Str);
lib/Target/PowerPC/PPCBoolRetToInt.cpp 97 return ConstantExpr::getZExt(C, IntTy);
lib/Target/PowerPC/PPCFastISel.cpp 321 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
321 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(Obj)) {
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp 138 ConstantExpr::getPointerBitCastOrAddrSpaceCast(NewF, OldF->getType()));
lib/Target/WebAssembly/WebAssemblyFastISel.cpp 220 } else if (const auto *C = dyn_cast<ConstantExpr>(Obj)) {
220 } else if (const auto *C = dyn_cast<ConstantExpr>(Obj)) {
758 if (!IsDirect && isa<ConstantExpr>(Call->getCalledValue()))
lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp 266 ConstantExpr::getBitCast(Main, PointerType::get(MainTy, 0));
lib/Target/X86/X86FastISel.cpp 842 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
842 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
1021 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
1021 } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
3260 Val = ConstantExpr::getSExt(CI, Type::getInt32Ty(CI->getContext()));
3262 Val = ConstantExpr::getZExt(CI, Type::getInt32Ty(CI->getContext()));
lib/Target/X86/X86ISelLowering.cpp 2293 return ConstantExpr::getIntToPtr(
lib/Target/XCore/XCoreISelLowering.cpp 298 Constant *GA = ConstantExpr::getBitCast(const_cast<GlobalValue*>(GV), Ty);
301 Constant *GAI = ConstantExpr::getGetElementPtr(
lib/Target/XCore/XCoreLowerThreadLocal.cpp 77 createReplacementInstr(ConstantExpr *CE, Instruction *Instr) {
128 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) {
149 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU);
149 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU);
167 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU);
167 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU);
lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp 287 C = ConstantExpr::getIntegerCast(C, Ty, false);
lib/Transforms/CFGuard/CFGuard.cpp 196 GuardFnGlobal = ConstantExpr::getBitCast(GuardFnGlobal, PTy);
lib/Transforms/Coroutines/CoroElide.cpp 59 Value = ConstantExpr::getBitCast(Value, IntrTy);
233 ConstantExpr::getExtractValue(Resumers, CoroSubFnInst::ResumeIndex);
239 auto *DestroyAddrConstant = ConstantExpr::getExtractValue(
lib/Transforms/Coroutines/CoroInstr.h 190 ConstantExpr::getBitCast(getFunction(), Int8PtrTy));
lib/Transforms/Coroutines/CoroSplit.cpp 837 auto *BC = ConstantExpr::getPointerCast(GV, Type::getInt8PtrTy(C));
lib/Transforms/IPO/Attributor.cpp 1000 ConstantExpr::getTruncOrBitCast(RVC, CB->getType());
1007 ConstantExpr::getTruncOrBitCast(RVC, AnchorValue.getType());
lib/Transforms/IPO/DeadArgumentElimination.cpp 248 Fn.replaceAllUsesWith(ConstantExpr::getBitCast(NF, Fn.getType()));
lib/Transforms/IPO/FunctionImport.cpp 1057 GA->replaceAllUsesWith(ConstantExpr::getBitCast(NewFn, GA->getType()));
lib/Transforms/IPO/GlobalOpt.cpp 236 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
236 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
302 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
302 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
324 if (!isa<ConstantExpr>(GEP->getOperand(0))) {
325 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>(
325 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>(
423 (!isa<ConstantExpr>(U) ||
424 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr))
569 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) {
569 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) {
575 ConstantExpr::getGetElementPtr(NewTy, cast<Constant>(NewPtr), Idxs);
591 cast<ConstantExpr>(GEP)->destroyConstant();
716 ConstantExpr::getCast(CI->getOpcode(),
734 GEPI, ConstantExpr::getGetElementPtr(GEPI->getSourceElementType(),
879 RepValue = ConstantExpr::getBitCast(RepValue, GV->getValueType());
1585 SOVC = ConstantExpr::getBitCast(SOVC, GV->getInitializer()->getType());
1874 if (!isa<ConstantExpr>(U))
1891 SmallVector<ConstantExpr*,4> Users;
1893 if (isa<ConstantExpr>(U))
1894 Users.push_back(cast<ConstantExpr>(U));
1904 for (auto *U : Users) {
2389 ConstantExpr *Addr, unsigned OpNo) {
2438 ConstantExpr *CE = cast<ConstantExpr>(Addr);
2438 ConstantExpr *CE = cast<ConstantExpr>(Addr);
2486 SmallVector<std::pair<ConstantExpr*, Constant*>, 32> ComplexCEs;
2487 SmallVector<std::pair<ConstantExpr*, Constant*>, 32> SimpleCEs;
2494 ConstantExpr *GEP = cast<ConstantExpr>(I.first);
2494 ConstantExpr *GEP = cast<ConstantExpr>(I.first);
2555 ConstantExpr *GEP = CEPair.first;
2612 = ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, Int8PtrTy);
2791 J->replaceAllUsesWith(ConstantExpr::getBitCast(Aliasee, J->getType()));
lib/Transforms/IPO/GlobalSplit.cpp 126 auto *NewGEP = ConstantExpr::getGetElementPtr(
lib/Transforms/IPO/LowerTypeTests.cpp 375 ConstantExpr::getBitCast(P.second, P.first->getType()));
624 ConstantExpr::getIntToPtr(ConstantInt::get(Int8Ty, Mask), Int8PtrTy));
640 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(
682 B.CreateAnd(Byte, ConstantExpr::getPtrToInt(TIL.BitMask, Int8Ty));
745 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy);
760 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy));
762 PtrOffset, ConstantExpr::getZExt(
763 ConstantExpr::getSub(
875 Constant *CombinedGlobalElemPtr = ConstantExpr::getGetElementPtr(
916 ExportGlobal(Name, ConstantExpr::getIntToPtr(C, Int8PtrTy));
968 C = ConstantExpr::getBitCast(C, Int8PtrTy);
978 C = ConstantExpr::getIntToPtr(C, Ty);
985 C = ConstantExpr::getPtrToInt(C, Ty);
1109 CombinedGlobalAddr = ConstantExpr::getBitCast(CombinedGlobalAddr, Int8PtrTy);
1125 TIL.OffsetedGlobal = ConstantExpr::getGetElementPtr(
1303 Constant *Target = ConstantExpr::getSelect(
1304 ConstantExpr::getICmp(CmpInst::ICMP_NE, F,
1497 ConstantExpr::getPointerCast(JumpTableFn, JumpTableType->getPointerTo(0));
1510 Constant *CombinedGlobalElemPtr = ConstantExpr::getBitCast(
1511 ConstantExpr::getInBoundsGetElementPtr(
lib/Transforms/IPO/MergeFunctions.cpp 446 Constant *BitcastNew = ConstantExpr::getBitCast(New, Old->getType());
766 Constant *BitcastF = ConstantExpr::getBitCast(F, G->getType());
837 Constant *BitcastF = ConstantExpr::getBitCast(F, G->getType());
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp 161 F.replaceAllUsesWith(ConstantExpr::getBitCast(NewF, F.getType()));
lib/Transforms/IPO/WholeProgramDevirt.cpp 875 VCallSite.CS.setCalledFunction(ConstantExpr::getBitCast(
1253 ConstantExpr::getIntToPtr(ConstantInt::get(Int32Ty, Const), Int8PtrTy));
1277 C = ConstantExpr::getPtrToInt(C, IntTy);
1314 Constant *C = ConstantExpr::getBitCast(M->Bits->GV, Int8PtrTy);
1315 return ConstantExpr::getGetElementPtr(Int8Ty, C,
1527 ConstantExpr::getGetElementPtr(
lib/Transforms/InstCombine/InstCombineAddSub.cpp 850 Constant *WideC = ConstantExpr::getSExt(NarrowC, Ty);
851 Constant *NewC = ConstantExpr::getAdd(WideC, Op1C);
857 Constant *WideC = ConstantExpr::getZExt(NarrowC, Ty);
858 Constant *NewC = ConstantExpr::getAdd(WideC, Op1C);
880 return BinaryOperator::CreateSub(ConstantExpr::getAdd(Op00C, Op1C), X);
1259 return BinaryOperator::CreateSub(ConstantExpr::getAdd(XorRHS, CI),
1266 ConstantExpr::getXor(XorRHS, CI));
1542 ConstantExpr::getFPToSI(CFP, LHSIntVal->getType());
1544 ConstantExpr::getSIToFP(CI, I.getType()) == CFP &&
1765 return BinaryOperator::CreateAdd(X, ConstantExpr::getSub(C, C2));
1769 return BinaryOperator::CreateSub(ConstantExpr::getSub(C, C2), X);
1934 if (match(Op1, m_Mul(m_Value(A), m_Constant(C))) && !isa<ConstantExpr>(C)) {
1935 Value *NewMul = Builder.CreateMul(A, ConstantExpr::getNeg(C));
2040 return BinaryOperator::CreateFMulFMF(X, ConstantExpr::getFNeg(C), &I);
2043 return BinaryOperator::CreateFDivFMF(X, ConstantExpr::getFNeg(C), &I);
2046 return BinaryOperator::CreateFDivFMF(ConstantExpr::getFNeg(C), X, &I);
2135 if (match(Op1, m_Constant(C)) && !isa<ConstantExpr>(Op1))
2136 return BinaryOperator::CreateFAddFMF(Op0, ConstantExpr::getFNeg(C), &I);
2183 Constant *CSubOne = ConstantExpr::getFSub(C, ConstantFP::get(Ty, 1.0));
2188 Constant *OneSubC = ConstantExpr::getFSub(ConstantFP::get(Ty, 1.0), C);
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp 258 } else if (ACst && CCst && ConstantExpr::getAnd(ACst, CCst) == CCst) {
268 } else if (BCst && CCst && ConstantExpr::getAnd(BCst, CCst) == CCst) {
476 ECst = cast<ConstantInt>(ConstantExpr::getXor(DCst, ECst));
729 CCst = cast<ConstantInt>(ConstantExpr::getXor(BCst, CCst));
731 ECst = cast<ConstantInt>(ConstantExpr::getXor(DCst, ECst));
740 Value *NewOr2 = ConstantExpr::getOr(CCst, ECst);
1512 Constant *TruncC = ConstantExpr::getTrunc(C, SrcTy);
1513 Constant *ZextTruncC = ConstantExpr::getZExt(TruncC, DestTy);
1522 Constant *TruncC = ConstantExpr::getTrunc(C, SrcTy);
1523 Constant *SextTruncC = ConstantExpr::getSExt(TruncC, DestTy);
1714 Value *NewC = ConstantExpr::getTrunc(C, X->getType());
1831 auto *TruncC1 = ConstantExpr::getTrunc(C1, X->getType());
1838 auto *TruncC2 = ConstantExpr::getTrunc(AndRHS, X->getType());
1860 Constant *C3 = ConstantExpr::getTrunc(YC, I.getType());
1861 C3 = ConstantExpr::getAnd(C3, AndRHS);
2131 if (AConst == ConstantExpr::getNot(BConst))
2158 AConst = ConstantExpr::getTrunc(AConst, CmpInst::makeCmpResultType(Ty));
2529 V2 = Builder.CreateOr(V1, ConstantExpr::getOr(C3, C4), "bitfield");
3062 return BinaryOperator::CreateLShr(ConstantExpr::getNot(C), Y);
3067 return BinaryOperator::CreateAShr(ConstantExpr::getNot(C), Y);
3071 return BinaryOperator::CreateSub(ConstantExpr::getNeg(AddOne(C)), X);
3080 Value *And = Builder.CreateAnd(X, ConstantExpr::getNot(C2));
3081 return BinaryOperator::CreateXor(And, ConstantExpr::getNot(C1));
3085 Value *Or = Builder.CreateOr(X, ConstantExpr::getNot(C2));
3086 return BinaryOperator::CreateXor(Or, ConstantExpr::getNot(C1));
lib/Transforms/InstCombine/InstCombineCalls.cpp 1951 !isa<ConstantExpr>(ShAmtC) && !ShAmtC->containsConstantExpression()) {
1954 Constant *ModuloC = ConstantExpr::getURem(ShAmtC, WidthC);
1968 Constant *LeftShiftC = ConstantExpr::getSub(WidthC, ShAmtC);
1985 ConstantExpr::getSub(WidthC, ShAmtC));
2062 Value *NegVal = ConstantExpr::getNeg(C);
2112 Value *NegVal = ConstantExpr::getNeg(C);
3274 CV0 = ConstantExpr::getIntegerCast(CV0, NewVT, /*isSigned=*/!Zext);
3275 CV1 = ConstantExpr::getIntegerCast(CV1, NewVT, /*isSigned=*/!Zext);
3277 return replaceInstUsesWith(CI, ConstantExpr::getMul(CV0, CV1));
3678 Constant *CCmp = ConstantExpr::getCompare(CCVal, CSrc0, CSrc1);
3681 *II, ConstantExpr::getSExt(CCmp, II->getType()));
4797 NestF : ConstantExpr::getBitCast(NestF,
4836 Constant *NewCallee = ConstantExpr::getBitCast(NestF, CalleeTy);
lib/Transforms/InstCombine/InstCombineCasts.cpp 164 C = ConstantExpr::getIntegerCast(C, Ty, isSigned /*Sext or ZExt*/);
601 Constant *NarrowC = ConstantExpr::getTrunc(C, DestTy);
607 Constant *NarrowC = ConstantExpr::getTrunc(C, DestTy);
1209 return BinaryOperator::CreateAnd(X, ConstantExpr::getZExt(C, CI.getType()));
1216 Constant *ZC = ConstantExpr::getZExt(C, CI.getType());
1934 return collectInsertionElements(ConstantExpr::getBitCast(C, VecEltTy),
1940 C = ConstantExpr::getBitCast(C, IntegerType::get(V->getContext(),
1947 Constant *Piece = ConstantExpr::getLShr(C, ConstantInt::get(C->getType(),
1949 Piece = ConstantExpr::getTrunc(Piece, ElementIntTy);
2094 Value *CastedC = ConstantExpr::getBitCast(C, DestTy);
2235 NewV = ConstantExpr::getBitCast(C, DestTy);
lib/Transforms/InstCombine/InstCombineCompares.cpp 229 Elt = ConstantExpr::getExtractValue(Elt, LaterIndices);
232 if (AndCst) Elt = ConstantExpr::getAnd(Elt, AndCst);
778 Index = ConstantExpr::getAdd(
779 Index, ConstantExpr::getSExtOrBitCast(GEPIndex, IndexType));
904 ConstantExpr::getPointerBitCastOrAddrSpaceCast(
1010 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) &&
1011 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) {
1750 ConstantExpr::getNeg(cast<Constant>(And->getOperand(1)));
1806 NewOr = ConstantExpr::getOr(ConstantExpr::getNUWShl(One, C), One);
1806 NewOr = ConstantExpr::getOr(ConstantExpr::getNUWShl(One, C), One);
2610 ConstantExpr::getNeg(cast<Constant>(Y)));
2617 ConstantExpr::getNeg(cast<Constant>(Y)));
2692 ConstantExpr::getCompare(Cmp.getPredicate(), C1LessThan, C)
2695 ConstantExpr::getCompare(Cmp.getPredicate(), C2Equal, C)
2698 ConstantExpr::getCompare(Cmp.getPredicate(), C3GreaterThan, C)
2934 Constant *SubC = ConstantExpr::getSub(RHS, cast<Constant>(BOp1));
2957 return new ICmpInst(Pred, BOp0, ConstantExpr::getXor(RHS, BOC));
2969 Constant *SubC = ConstantExpr::getSub(cast<Constant>(BOp0), RHS);
2983 Constant *NotBOC = ConstantExpr::getNot(cast<Constant>(BOp1));
3199 Op1 = ConstantExpr::getICmp(I.getPredicate(), C, RHSC);
3203 Op2 = ConstantExpr::getICmp(I.getPredicate(), C, RHSC);
3525 NewShAmt = ConstantExpr::getZExtOrBitCast(NewShAmt, WidestTy);
3894 ConstantExpr::getNeg(RHSC));
4354 Constant *Res1 = ConstantExpr::getTrunc(C, SrcTy);
4355 Constant *Res2 = ConstantExpr::getCast(CastOp0->getOpcode(), Res1, DestTy);
4424 NewOp1 = ConstantExpr::getIntToPtr(RHSC, SrcTy);
4967 return new ICmpInst(Pred, ConstantExpr::getIntegerValue(Ty, Op0Min), Op1);
4969 return new ICmpInst(Pred, Op0, ConstantExpr::getIntegerValue(Ty, Op1Min));
5199 Constant *NewC = ConstantExpr::getAdd(C, OneOrNegOne);
5767 ? ConstantExpr::getFPToUI(RHSC, IntTy)
5768 : ConstantExpr::getFPToSI(RHSC, IntTy);
5771 ? ConstantExpr::getUIToFP(RHSInt, RHSC->getType()) == RHSC
5772 : ConstantExpr::getSIToFP(RHSInt, RHSC->getType()) == RHSC;
6076 Constant *NegC = ConstantExpr::getFNeg(C);
lib/Transforms/InstCombine/InstCombineInternal.h 172 return ConstantExpr::getAdd(C, ConstantInt::get(C->getType(), 1));
177 return ConstantExpr::getSub(C, ConstantInt::get(C->getType(), 1));
250 auto *SafeC = ConstantExpr::getBinOpIdentity(Opcode, EltTy, IsRHSConstant);
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp 42 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
42 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
417 ConstantExpr::getPointerBitCastOrAddrSpaceCast(TheSrc, DestTy);
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 203 Constant *Shl = ConstantExpr::getShl(C1, C2);
281 return BinaryOperator::CreateMul(X, ConstantExpr::getNeg(Op1C));
424 return BinaryOperator::CreateFMulFMF(X, ConstantExpr::getFNeg(C), &I);
441 Constant *CC1 = ConstantExpr::getFMul(C, C1);
447 Constant *CDivC1 = ConstantExpr::getFDiv(C, C1);
453 Constant *C1DivC = ConstantExpr::getFDiv(C1, C);
463 Constant *CC1 = ConstantExpr::getFMul(C, C1);
469 Constant *CC1 = ConstantExpr::getFMul(C, C1);
938 Constant *TruncC = ConstantExpr::getTrunc(C, X->getType());
939 if (ConstantExpr::getZExt(TruncC, Ty) != C)
1092 ConstantExpr::getTrunc(cast<Constant>(Op1), Op0Src->getType());
1149 return BinaryOperator::CreateFDivFMF(X, ConstantExpr::getFNeg(C), &I);
1161 auto *RecipC = ConstantExpr::getFDiv(ConstantFP::get(I.getType(), 1.0), C);
1178 return BinaryOperator::CreateFDivFMF(ConstantExpr::getFNeg(C), X, &I);
1187 NewC = ConstantExpr::getFDiv(C, C2);
1190 NewC = ConstantExpr::getFMul(C, C2);
1456 Elts[i] = cast<ConstantInt>(ConstantExpr::getNeg(RHS));
lib/Transforms/InstCombine/InstCombinePHI.cpp 689 Constant *Trunc = ConstantExpr::getTrunc(C, NarrowType);
690 if (ConstantExpr::getZExt(Trunc, C->getType()) != C)
lib/Transforms/InstCombine/InstCombineSelect.cpp 85 Constant *IdC = ConstantExpr::getBinOpIdentity(BO->getOpcode(), Ty, true);
931 Constant *SextRHS = ConstantExpr::getSExt(AdjustedRHS, SelTy);
945 Constant *ZextRHS = ConstantExpr::getZExt(AdjustedRHS, SelTy);
1282 auto *ThresholdLowIncl = ConstantExpr::getNeg(C1);
1283 auto *ThresholdHighExcl = ConstantExpr::getSub(C0, C1);
1286 auto *Precond1 = ConstantExpr::getICmp(ICmpInst::Predicate::ICMP_SGE, C2,
1291 auto *Precond2 = ConstantExpr::getICmp(ICmpInst::Predicate::ICMP_SLE, C2,
1763 Constant *TruncC = ConstantExpr::getTrunc(C, SmallType);
1764 Constant *ExtC = ConstantExpr::getCast(ExtOpcode, TruncC, SelType);
1783 Constant *AllOnesOrOne = ConstantExpr::getCast(ExtOpcode, One, SelType);
lib/Transforms/InstCombine/InstCombineShifts.cpp 114 NewShAmt = ConstantExpr::getZExtOrBitCast(NewShAmt, X->getType());
222 auto *ExtendedSumOfShAmts = ConstantExpr::getZExt(SumOfShAmts, ExtendedTy);
224 auto *ExtendedAllOnes = ConstantExpr::getAllOnesValue(ExtendedTy);
226 ConstantExpr::getShl(ExtendedAllOnes, ExtendedSumOfShAmts);
227 NewMask = ConstantExpr::getNot(ExtendedInvertedMask);
247 auto *ExtendedNumHighBitsToClear = ConstantExpr::getZExt(
248 ConstantExpr::getSub(ConstantInt::get(ShAmtsDiff->getType(),
254 auto *ExtendedAllOnes = ConstantExpr::getAllOnesValue(ExtendedTy);
256 ConstantExpr::getLShr(ExtendedAllOnes, ExtendedNumHighBitsToClear);
260 NewMask = ConstantExpr::getTrunc(NewMask, NarrowestTy);
645 ConstantExpr::getZExt(cast<Constant>(Op1), TrOp->getType());
717 Value *XM = Builder.CreateAnd(V1, ConstantExpr::getShl(CC, Op1),
751 Value *XM = Builder.CreateAnd(V1, ConstantExpr::getShl(CC, Op1),
767 Constant *NewRHS = ConstantExpr::get(I.getOpcode(),
784 Constant *NewRHS = ConstantExpr::get(I.getOpcode(),
811 Constant *NewRHS = ConstantExpr::get(I.getOpcode(),
830 Constant *NewRHS = ConstantExpr::get(I.getOpcode(),
945 return BinaryOperator::CreateShl(ConstantExpr::getShl(C2, C1), X);
949 return BinaryOperator::CreateMul(X, ConstantExpr::getShl(C2, C1));
953 auto *NewC = ConstantExpr::getShl(ConstantInt::get(Ty, 1), C1);
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp 1375 if (isa<ConstantExpr>(CElt))
lib/Transforms/InstCombine/InstCombineVectorOps.cpp 1309 return ConstantExpr::getShuffleVector(C, UndefValue::get(C->getType()),
1451 Constant *ShlOne = ConstantExpr::getShl(ConstantInt::get(Ty, 1), C);
1489 Constant *IdC = ConstantExpr::getBinOpIdentity(BOpcode, Shuf.getType(), true);
1498 Constant *NewC = Op0IsBinop ? ConstantExpr::getShuffleVector(C, IdC, Mask) :
1499 ConstantExpr::getShuffleVector(IdC, C, Mask);
1621 Constant *NewC = ConstantExpr::getShuffleVector(C0, C1, Mask);
lib/Transforms/InstCombine/InstructionCombining.cpp 286 Constant *CastC2 = ConstantExpr::getCast(CastOpcode, C2, DestTy);
287 Constant *FoldedC = ConstantExpr::get(AssocOpcode, C1, CastC2);
454 I.setOperand(1, ConstantExpr::get(Opcode, C1, C2));
513 return ConstantExpr::getBinOpIdentity(Opcode, V->getType());
531 RHS = ConstantExpr::getShl(ConstantInt::get(Op->getType(), 1), C);
702 if (L && L == ConstantExpr::getBinOpIdentity(InnerOpcode, L->getType())) {
711 if (R && R == ConstantExpr::getBinOpIdentity(InnerOpcode, R->getType())) {
739 if (L && L == ConstantExpr::getBinOpIdentity(InnerOpcode, L->getType())) {
748 if (R && R == ConstantExpr::getBinOpIdentity(InnerOpcode, R->getType())) {
803 return ConstantExpr::getNeg(C);
807 return ConstantExpr::getNeg(C);
821 return ConstantExpr::getNeg(CV);
840 return ConstantExpr::get(I.getOpcode(), SOC, ConstOperand);
841 return ConstantExpr::get(I.getOpcode(), ConstOperand, SOC);
914 return ConstantExpr::get(I->getOpcode(), InC, C);
915 return ConstantExpr::get(I->getOpcode(), C, InC);
955 if (isa<Constant>(InVal) && !isa<ConstantExpr>(InVal))
1014 if (InC && !isa<ConstantExpr>(InC) && isa<ConstantInt>(InC))
1036 InV = ConstantExpr::getCompare(CI->getPredicate(), InC, C);
1057 InV = ConstantExpr::getCast(CI->getOpcode(), InC, RetTy);
1535 ConstOp1 ? ConstantExpr::get(Opcode, UndefScalar, CElt)
1536 : ConstantExpr::get(Opcode, CElt, UndefScalar);
1591 Constant *NarrowC = ConstantExpr::getTrunc(WideC, X->getType());
1592 if (ConstantExpr::getCast(CastOpc, NarrowC, BO.getType()) != WideC)
2599 Constant *NewCase = ConstantExpr::getSub(Case.getCaseValue(), AddRHS);
2726 ConstantExpr::getNot(CI));
3418 if (!isa<ConstantVector>(U) && !isa<ConstantExpr>(U))
lib/Transforms/Instrumentation/AddressSanitizer.cpp 1767 Value *ModuleNameAddr = ConstantExpr::getPointerCast(ModuleName, IntptrTy);
2143 ConstantExpr::getPointerCast(Metadata, IntptrTy));
2320 ConstantExpr::getGetElementPtr(NewTy, NewGlobal, Indices2, true));
2328 SourceLoc = ConstantExpr::getPointerCast(SourceLocGlobal, IntptrTy);
2333 Constant *ODRIndicator = ConstantExpr::getNullValue(IRB.getInt8PtrTy());
2348 ODRIndicator = ConstantExpr::getIntToPtr(ConstantInt::get(IntptrTy, -1),
2368 ConstantExpr::getPointerCast(InstrumentedGlobal, IntptrTy),
2371 ConstantExpr::getPointerCast(Name, IntptrTy),
2372 ConstantExpr::getPointerCast(ModuleName, IntptrTy),
2374 ConstantExpr::getPointerCast(ODRIndicator, IntptrTy));
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp 587 GetArgTLS = ConstantExpr::getIntToPtr(
594 GetRetvalTLS = ConstantExpr::getIntToPtr(
813 GA->replaceAllUsesWith(ConstantExpr::getBitCast(NewF, GA->getType()));
865 ConstantExpr::getBitCast(NewF, PointerType::getUnqual(FT)));
895 ConstantExpr::getBitCast(NewF, PointerType::getUnqual(FT));
lib/Transforms/Instrumentation/GCOVProfiling.cpp 1021 {Builder.getInt32(Arcs), ConstantExpr::getInBoundsGetElementPtr(
1052 ConstantExpr::getInBoundsGetElementPtr(EmitFunctionCallArgsArrayTy,
1055 ConstantExpr::getInBoundsGetElementPtr(
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp 597 return ConstantExpr::getIntToPtr(ConstantInt::get(IntptrTy, Mapping.Offset),
1293 auto *GVRelPtr = ConstantExpr::getTrunc(
1294 ConstantExpr::getAdd(
1295 ConstantExpr::getSub(
1296 ConstantExpr::getPtrToInt(NewGV, Int64Ty),
1297 ConstantExpr::getPtrToInt(Descriptor, Int64Ty)),
1310 Constant *Aliasee = ConstantExpr::getIntToPtr(
1311 ConstantExpr::getAdd(
1312 ConstantExpr::getPtrToInt(NewGV, Int64Ty),
1379 return ConstantExpr::getTrunc(
1380 ConstantExpr::getSub(ConstantExpr::getPtrToInt(Ptr, Int64Ty),
1380 ConstantExpr::getSub(ConstantExpr::getPtrToInt(Ptr, Int64Ty),
1381 ConstantExpr::getPtrToInt(Note, Int64Ty)),
lib/Transforms/Instrumentation/InstrProfiling.cpp 813 ConstantExpr::getBitCast(ValuesVar, Type::getInt8PtrTy(Ctx));
827 ? ConstantExpr::getBitCast(Fn, Int8PtrTy)
lib/Transforms/Instrumentation/PGOInstrumentation.cpp 826 {ConstantExpr::getBitCast(FuncInfo.FuncNameVar, I8PtrTy),
864 {ConstantExpr::getBitCast(FuncInfo.FuncNameVar, I8PtrTy),
1355 {ConstantExpr::getBitCast(FuncNameVar, I8PtrTy),
lib/Transforms/Instrumentation/SanitizerCoverage.cpp 764 C = ConstantExpr::getCast(CastInst::ZExt, It.getCaseValue(), Int64Ty);
lib/Transforms/Scalar/ConstantHoisting.cpp 394 ConstantExpr *ConstExpr) {
460 if (auto ConstExpr = dyn_cast<ConstantExpr>(Opnd)) {
619 ConstantExpr *ConstExpr = MaxCostItr->ConstExpr;
794 if (auto ConstExpr = dyn_cast<ConstantExpr>(Opnd)) {
lib/Transforms/Scalar/GVNHoist.cpp 310 if (isa<ConstantExpr>(V))
lib/Transforms/Scalar/InferAddressSpaces.cpp 314 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
314 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
329 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Op->getOperand(I))) {
329 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Op->getOperand(I))) {
423 return ConstantExpr::getAddrSpaceCast(C, NewPtrTy);
504 ConstantExpr *CE, unsigned NewAddrSpace,
515 return ConstantExpr::getBitCast(CE->getOperand(0), TargetType);
520 return ConstantExpr::getBitCast(cast<Constant>(NewOperand), TargetType);
521 return ConstantExpr::getAddrSpaceCast(CE, TargetType);
530 return ConstantExpr::getSelect(
531 CE->getOperand(0), ConstantExpr::getAddrSpaceCast(Src0, TargetType),
532 ConstantExpr::getAddrSpaceCast(Src1, TargetType));
551 if (auto CExpr = dyn_cast<ConstantExpr>(Operand))
604 cast<ConstantExpr>(V), NewAddrSpace, ValueWithNewAddrSpace);
915 Constant *Replace = ConstantExpr::getAddrSpaceCast(cast<Constant>(NewV),
980 ConstantExpr::getAddrSpaceCast(KOtherSrc, NewV->getType()));
1011 U.set(ConstantExpr::getAddrSpaceCast(cast<Constant>(NewV),
lib/Transforms/Scalar/JumpThreading.cpp 681 R.first = ConstantExpr::getCast(CI->getOpcode(), R.first, CI->getType());
740 R.first = ConstantExpr::getNot(R.first);
757 Constant *Folded = ConstantExpr::get(BO->getOpcode(), V, CI);
902 Constant *Folded = ConstantExpr::getCompare(Pred, V, CmpConst);
lib/Transforms/Scalar/LoopIdiomRecognize.cpp 1027 Value *PatternPtr = ConstantExpr::getBitCast(GV, Int8PtrTy);
lib/Transforms/Scalar/LoopStrengthReduce.cpp 5291 C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false,
lib/Transforms/Scalar/NewGVN.cpp 4143 if (isa<ConstantExpr>(V))
lib/Transforms/Scalar/Reassociate.cpp 624 Constant *Identity = ConstantExpr::getBinOpIdentity(Opcode, I->getType());
818 return C->getType()->isFPOrFPVectorTy() ? ConstantExpr::getFNeg(C) :
819 ConstantExpr::getNeg(C);
977 MulCst = ConstantExpr::getShl(MulCst, cast<Constant>(Shl->getOperand(1)));
1841 Cst = Cst ? ConstantExpr::get(Opcode, C, Cst) : C;
1850 if (Cst && Cst != ConstantExpr::getBinOpIdentity(Opcode, I->getType())) {
1851 if (Cst == ConstantExpr::getBinOpAbsorber(Opcode, I->getType()))
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp 1810 if (!isa<ConstantExpr>(U)) {
lib/Transforms/Scalar/SCCP.cpp 983 Constant *C = ConstantExpr::get(I.getOpcode(), V0State.getConstant());
1007 Constant *C = ConstantExpr::get(I.getOpcode(), V1State.getConstant(),
1123 ConstantExpr::getGetElementPtr(I.getSourceElementType(), Ptr, Indices);
lib/Transforms/Scalar/SROA.cpp 2740 ConstantExpr::getUDiv(
2742 ConstantExpr::getZExt(Constant::getAllOnesValue(V->getType()),
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp 622 Current = ConstantExpr::getCast((*I)->getOpcode(), C, (*I)->getType());
lib/Transforms/Scalar/StructurizeCFG.cpp 406 return ConstantExpr::getNot(C);
lib/Transforms/Utils/CanonicalizeAliases.cpp 52 auto *CE = dyn_cast<ConstantExpr>(C);
52 auto *CE = dyn_cast<ConstantExpr>(C);
lib/Transforms/Utils/CtorUtils.cpp 57 V = ConstantExpr::getBitCast(V, GCL->getType());
lib/Transforms/Utils/EntryExitInstrumenter.cpp 51 Value *Args[] = {ConstantExpr::getBitCast(&CurFn, Type::getInt8PtrTy(C)),
lib/Transforms/Utils/Evaluator.cpp 84 ConstantExpr *CE = cast<ConstantExpr>(C);
84 ConstantExpr *CE = cast<ConstantExpr>(C);
141 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
141 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
198 Ptr = ConstantExpr::getGetElementPtr(Ty, Ptr, IdxList);
231 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) {
231 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) {
275 auto *CE = dyn_cast<ConstantExpr>(V);
275 auto *CE = dyn_cast<ConstantExpr>(V);
312 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr);
312 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr);
364 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
364 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
399 InstResult = ConstantExpr::get(BO->getOpcode(),
405 InstResult = ConstantExpr::getCompare(CI->getPredicate(),
411 InstResult = ConstantExpr::getCast(CI->getOpcode(),
417 InstResult = ConstantExpr::getSelect(getVal(SI->getOperand(0)),
423 InstResult = ConstantExpr::getExtractValue(
428 InstResult = ConstantExpr::getInsertValue(
440 ConstantExpr::getGetElementPtr(GEP->getSourceElementType(), P, GEPOps,
lib/Transforms/Utils/FunctionComparator.cpp 343 const ConstantExpr *LE = cast<ConstantExpr>(L);
343 const ConstantExpr *LE = cast<ConstantExpr>(L);
344 const ConstantExpr *RE = cast<ConstantExpr>(R);
344 const ConstantExpr *RE = cast<ConstantExpr>(R);
lib/Transforms/Utils/GlobalStatus.cpp 69 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(UR)) {
69 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(UR)) {
lib/Transforms/Utils/LibCallsShrinkWrap.cpp 117 V = ConstantExpr::getFPExtend(V, Arg->getType());
442 V = ConstantExpr::getFPExtend(V, Exp->getType());
471 V = ConstantExpr::getFPExtend(V, Exp->getType());
473 V0 = ConstantExpr::getFPExtend(V0, Exp->getType());
lib/Transforms/Utils/Local.cpp 709 BA->replaceAllUsesWith(ConstantExpr::getIntToPtr(Replacement,
2559 auto *NullInt = ConstantExpr::getPtrToInt(
2561 auto *NonNullInt = ConstantExpr::getAdd(NullInt, ConstantInt::get(ITy, 1));
lib/Transforms/Utils/LowerSwitch.cpp 363 Constant* NegLo = ConstantExpr::getNeg(Leaf.Low);
367 Constant *UpperBound = ConstantExpr::getAdd(NegLo, Leaf.High);
lib/Transforms/Utils/ModuleUtils.cpp 46 CSVals[2] = Data ? ConstantExpr::getPointerCast(Data, IRB.getInt8PtrTy())
87 Constant *C = ConstantExpr::getBitCast(V, Int8PtrTy);
lib/Transforms/Utils/SanitizerStats.cpp 52 ConstantExpr::getIntToPtr(
62 auto InitAddr = ConstantExpr::getGetElementPtr(
68 B.CreateCall(StatReport, ConstantExpr::getBitCast(InitAddr, Int8PtrTy));
90 ConstantExpr::getBitCast(NewModuleStatsGV, ModuleStatsGV->getType()));
103 B.CreateCall(StatInit, ConstantExpr::getBitCast(NewModuleStatsGV, Int8PtrTy));
lib/Transforms/Utils/SimplifyCFG.cpp 355 if (ConstantExpr *C = dyn_cast<ConstantExpr>(V))
355 if (ConstantExpr *C = dyn_cast<ConstantExpr>(V))
424 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
424 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
432 ConstantExpr::getIntegerCast(CI, PtrTy, /*isSigned=*/false));
1368 if (isa<ConstantExpr>(BB1V) && !isSafeToSpeculativelyExecute(BB1V))
1370 if (isa<ConstantExpr>(BB2V) && !isSafeToSpeculativelyExecute(BB2V))
2059 ConstantExpr *OrigCE = dyn_cast<ConstantExpr>(OrigV);
2059 ConstantExpr *OrigCE = dyn_cast<ConstantExpr>(OrigV);
2060 ConstantExpr *ThenCE = dyn_cast<ConstantExpr>(ThenV);
2060 ConstantExpr *ThenCE = dyn_cast<ConstantExpr>(ThenV);
2491 if (ConstantExpr *TCV = dyn_cast_or_null<ConstantExpr>(TrueValue))
2491 if (ConstantExpr *TCV = dyn_cast_or_null<ConstantExpr>(TrueValue))
2494 if (ConstantExpr *FCV = dyn_cast_or_null<ConstantExpr>(FalseValue))
2494 if (ConstantExpr *FCV = dyn_cast_or_null<ConstantExpr>(FalseValue))
2655 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(0)))
2655 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(0)))
2658 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(1)))
2658 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Cond->getOperand(1)))
3270 if (auto *CE = dyn_cast<ConstantExpr>(BI->getCondition()))
3270 if (auto *CE = dyn_cast<ConstantExpr>(BI->getCondition()))
3328 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(BIV))
3328 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(BIV))
3334 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(PBIV))
3334 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(PBIV))
4390 Constant *Offset = ConstantExpr::getNeg(ContiguousCases->back());
4613 !isa<UndefValue>(C) && !isa<ConstantExpr>(C))
4616 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
4616 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
5247 Constant *DefaultConst = ConstantExpr::getICmp(CmpInst->getPredicate(),
5255 Constant *CaseConst = ConstantExpr::getICmp(CmpInst->getPredicate(),
lib/Transforms/Utils/SimplifyLibCalls.cpp 1014 LHSC = ConstantExpr::getBitCast(LHSC, IntType->getPointerTo());
1019 RHSC = ConstantExpr::getBitCast(RHSC, IntType->getPointerTo());
lib/Transforms/Utils/VNCoercion.cpp 91 if (auto *C = dyn_cast<ConstantExpr>(StoredVal))
91 if (auto *C = dyn_cast<ConstantExpr>(StoredVal))
332 ConstantExpr::getBitCast(Src, Type::getInt8PtrTy(Src->getContext(), AS));
335 Src = ConstantExpr::getGetElementPtr(Type::getInt8Ty(Src->getContext()), Src,
337 Src = ConstantExpr::getBitCast(Src, PointerType::get(LoadTy, AS));
508 ConstantExpr::getBitCast(Src, Type::getInt8PtrTy(Src->getContext(), AS));
511 Src = ConstantExpr::getGetElementPtr(Type::getInt8Ty(Src->getContext()), Src,
513 Src = ConstantExpr::getBitCast(Src, PointerType::get(LoadTy, AS));
lib/Transforms/Utils/ValueMapper.cpp 473 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
473 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
lib/Transforms/Vectorize/SLPVectorizer.cpp 203 if (!isa<Constant>(i) || isa<ConstantExpr>(i) || isa<GlobalValue>(i))
tools/bugpoint/ExtractFunction.cpp 271 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
271 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
tools/bugpoint/Miscompilation.cpp 855 Value *GEP = ConstantExpr::getGetElementPtr(InitArray->getType(),
tools/clang/include/clang/CodeGen/ConstantInitBuilder.h 209 add(llvm::ConstantExpr::getBitCast(value, type));
238 offset = llvm::ConstantExpr::getAdd(offset,
tools/clang/lib/CodeGen/Address.h 88 return ConstantAddress(llvm::ConstantExpr::getBitCast(getPointer(), ty),
108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/BackendUtil.cpp 1608 ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, UsedElementType));
1641 ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, UsedElementType));
1664 ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV, UsedElementType));
tools/clang/lib/CodeGen/CGBlocks.cpp 205 return llvm::ConstantExpr::getBitCast(desc,
243 elements.add(llvm::ConstantExpr::getBitCast(
283 return llvm::ConstantExpr::getBitCast(global, CGM.getBlockDescriptorType());
939 auto *blockFn = llvm::ConstantExpr::getPointerCast(InvokeFn, GenVoidPtrTy);
960 isa = llvm::ConstantExpr::getBitCast(blockISA, VoidPtrTy);
1466 llvm::ConstantExpr::getPointerCast(literal, RequiredType);
1583 llvm::ConstantExpr::getPointerCast(fn, GenVoidPtrTy));
2000 return llvm::ConstantExpr::getBitCast(Func, VoidPtrTy);
2129 return llvm::ConstantExpr::getBitCast(Fn, VoidPtrTy);
2195 return llvm::ConstantExpr::getBitCast(Func, VoidPtrTy);
2259 return llvm::ConstantExpr::getBitCast(Fn, VoidPtrTy);
2508 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy);
2571 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy);
tools/clang/lib/CodeGen/CGBuiltin.cpp 3519 return RValue::get(llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy));
tools/clang/lib/CodeGen/CGCUDANV.cpp 98 return llvm::ConstantExpr::getGetElementPtr(ConstStr.getElementType(),
tools/clang/lib/CodeGen/CGCXX.cpp 143 Aliasee = llvm::ConstantExpr::getBitCast(Ref, AliasType);
tools/clang/lib/CodeGen/CGCall.cpp 4241 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(Ptr)) {
4241 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(Ptr)) {
tools/clang/lib/CodeGen/CGDecl.cpp 355 llvm::ConstantExpr::getBitCast(GV, OldGV->getType());
437 llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(var, expectedType);
868 isa<llvm::ConstantExpr>(Init))
905 isa<llvm::ConstantExpr>(Init)) {
tools/clang/lib/CodeGen/CGDeclCXX.cpp 126 Argument = llvm::ConstantExpr::getBitCast(Addr.getPointer(), DestTy);
132 Argument = llvm::ConstantExpr::getBitCast(
168 llvm::ConstantExpr::getBitCast(Addr, Int8PtrTy)};
199 DeclPtr = llvm::ConstantExpr::getAddrSpaceCast(DeclPtr, PTy);
tools/clang/lib/CodeGen/CGException.cpp 252 return llvm::ConstantExpr::getBitCast(cast<llvm::Constant>(Fn.getCallee()),
291 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(U)) {
291 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(U)) {
1726 llvm::ConstantExpr::getBitCast(ParentCGF.CurFn, Int8PtrTy);
1792 llvm::ConstantExpr::getBitCast(ParentCGF.CurFn, Int8PtrTy);
2026 llvm::ConstantExpr::getBitCast(FilterFunc, Int8PtrTy);
tools/clang/lib/CodeGen/CGExpr.cpp 433 Object = Address(llvm::ConstantExpr::getBitCast(Var,
491 Object = Address(llvm::ConstantExpr::getBitCast(
2413 V = llvm::ConstantExpr::getBitCast(V,
tools/clang/lib/CodeGen/CGExprConstant.cpp 1521 if (auto expr = dyn_cast<llvm::ConstantExpr>(init)) {
1556 llvm::ConstantExpr::getInBoundsGetElementPtr(BaseValueTy,
1558 location = llvm::ConstantExpr::getBitCast(location,
1692 return llvm::ConstantExpr::getZExt(C, boolTy);
1793 C = llvm::ConstantExpr::getBitCast(C, charPtrTy);
1794 C = llvm::ConstantExpr::getGetElementPtr(CGM.Int8Ty, C, getOffset());
1795 C = llvm::ConstantExpr::getPointerCast(C, origPtrTy);
1836 return llvm::ConstantExpr::getPointerCast(value, destTy);
1838 return llvm::ConstantExpr::getPtrToInt(value, destTy);
1857 C = llvm::ConstantExpr::getIntegerCast(getOffset(), intptrTy,
1859 C = llvm::ConstantExpr::getIntToPtr(C, destPtrTy);
1896 TypeInfo = llvm::ConstantExpr::getBitCast(TypeInfo, StdTypeInfoPtrTy);
1953 Ptr = llvm::ConstantExpr::getBitCast(Ptr,
2085 LHS = llvm::ConstantExpr::getPtrToInt(LHS, CGM.IntPtrTy);
2086 RHS = llvm::ConstantExpr::getPtrToInt(RHS, CGM.IntPtrTy);
2087 llvm::Constant *AddrLabelDiff = llvm::ConstantExpr::getSub(LHS, RHS);
2092 return llvm::ConstantExpr::getTruncOrBitCast(AddrLabelDiff, ResultType);
tools/clang/lib/CodeGen/CGObjC.cpp 50 return llvm::ConstantExpr::getBitCast(C, ConvertType(E->getType()));
3562 HelperFn = llvm::ConstantExpr::getBitCast(Fn, VoidPtrTy);
3667 HelperFn = llvm::ConstantExpr::getBitCast(Fn, VoidPtrTy);
tools/clang/lib/CodeGen/CGObjCGNU.cpp 206 return llvm::ConstantExpr::getGetElementPtr(Array.getElementType(),
228 return llvm::ConstantExpr::getGetElementPtr(ConstStr->getValueType(),
994 auto *ObjCStr = llvm::ConstantExpr::getIntToPtr(
1015 isa = llvm::ConstantExpr::getBitCast(isa, PtrToIdTy);
1108 llvm::Constant *ObjCStr = llvm::ConstantExpr::getBitCast(ObjCStrGV, IdTy);
1191 llvm::ConstantExpr::getBitCast(GenerateProtocolRef(PI),
1299 return llvm::ConstantExpr::getBitCast(GV, ProtocolPtrTy);
1318 llvm::ConstantExpr::getBitCast(Protocol, ProtocolPtrTy), RefName);
1373 llvm::ConstantExpr::getBitCast(GenerateProtocolRef(PI),
1389 ProtocolBuilder.add(llvm::ConstantExpr::getIntToPtr(
1411 OldGV->replaceAllUsesWith(llvm::ConstantExpr::getBitCast(GV,
1422 return llvm::ConstantExpr::getBitCast(Val, Ty);
1445 return llvm::ConstantExpr::getGetElementPtr(TypesGlobal->getValueType(),
1778 classFields.add(llvm::ConstantExpr::getBitCast(SuperClass, PtrTy));
1912 llvm::ConstantExpr::getBitCast(GenerateProtocolRef(I),
1931 classRefSymbol->setInitializer(llvm::ConstantExpr::getBitCast(classStruct, IdTy));
1952 llvm::ConstantExpr::getBitCast(classStruct, IdTy));
1960 llvm::ConstantExpr::getBitCast(classStruct, Placeholder->getType()));
1966 llvm::ConstantExpr::getBitCast(metaclass, IdTy));
2401 return llvm::ConstantExpr::getBitCast(IDEHType, PtrToInt8Ty);
2416 return llvm::ConstantExpr::getBitCast(typeinfo, PtrToInt8Ty);
2431 auto *BVtable = llvm::ConstantExpr::getBitCast(
2432 llvm::ConstantExpr::getGetElementPtr(Vtable->getValueType(), Vtable, Two),
2447 return llvm::ConstantExpr::getBitCast(TI, PtrToInt8Ty);
2474 isa = llvm::ConstantExpr::getBitCast(isa, PtrToIdTy);
2483 ObjCStr = llvm::ConstantExpr::getBitCast(ObjCStr, PtrToInt8Ty);
2975 ClassRef->replaceAllUsesWith(llvm::ConstantExpr::getBitCast(Class,
3045 MethodList = llvm::ConstantExpr::getBitCast(MethodList, PtrToInt8Ty);
3053 Elements.add(llvm::ConstantExpr::getIntToPtr(
3122 llvm::ConstantExpr::getIntToPtr(
3133 llvm::ConstantExpr::getBitCast(
3169 Categories.push_back(llvm::ConstantExpr::getBitCast(
3215 llvm::Constant *ptr = llvm::ConstantExpr::getPtrToInt(GS, IntPtrTy);
3270 Categories.push_back(llvm::ConstantExpr::getBitCast(
3550 llvm::Constant *offsetValue = llvm::ConstantExpr::getGetElementPtr(
3589 llvm::ConstantExpr::getBitCast(ClassStruct, IdTy));
3595 llvm::ConstantExpr::getBitCast(MetaClassStruct, IdTy));
3601 ClassStruct = llvm::ConstantExpr::getBitCast(ClassStruct, PtrToInt8Ty);
3651 statics = llvm::ConstantExpr::getBitCast(statics, PtrTy);
3712 llvm::Constant *selPtr = llvm::ConstantExpr::getGetElementPtr(
3716 selPtr = llvm::ConstantExpr::getBitCast(selPtr, SelectorTy);
3837 TheClass = llvm::ConstantExpr::getBitCast(TheClass, PtrTy);
tools/clang/lib/CodeGen/CGObjCMac.cpp 1834 return llvm::ConstantExpr::getGetElementPtr(C->getValueType(), C, Idxs);
1959 auto V = llvm::ConstantExpr::getBitCast(GV, CGM.IntTy->getPointerTo());
1975 auto V = llvm::ConstantExpr::getBitCast(GV, CGM.IntTy->getPointerTo());
2978 Result = llvm::ConstantExpr::getIntToPtr(Result, CGM.Int8PtrTy);
2991 return llvm::ConstantExpr::getBitCast(GetProtocolRef(PD),
3210 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.ProtocolListPtrTy);
3314 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.PropertyListPtrTy);
3335 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.Int8PtrPtrTy);
3832 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.IvarListPtrTy);
3951 return llvm::ConstantExpr::getBitCast(GV,
3968 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.MethodListPtrTy);
5081 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.SymtabPtrTy);
5092 llvm::ConstantExpr::getBitCast(GetClassName(II->getName()),
5130 llvm::ConstantExpr::getBitCast(GetMethodVarName(Sel),
6060 Symbols[i] = llvm::ConstantExpr::getBitCast(Container[i],
6512 llvm::ConstantExpr::getBitCast(GetOrEmitProtocol(PD),
6717 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.MethodListnfABIPtrTy);
6859 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.IvarListnfABIPtrTy);
7021 return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.ProtocolListnfABIPtrTy);
7039 return llvm::ConstantExpr::getBitCast(GV,
7275 llvm::ConstantExpr::getBitCast(NewGV, GV->getType()));
7294 ClassGV = llvm::ConstantExpr::getPointerCast(ClassGV, ObjCTypes.Int8PtrTy);
7299 return llvm::ConstantExpr::getGetElementPtr(CGM.Int8Ty, ClassGV, Idx);
7492 llvm::ConstantExpr::getBitCast(GetMethodVarName(Sel),
7725 llvm::ConstantExpr::getInBoundsGetElementPtr(VTableGV->getValueType(),
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp 1012 auto *ElemSizeOf = llvm::ConstantExpr::getSizeOf(ElemType);
1295 llvm::ConstantExpr::getBitCast(GA, OrigAddr->getType()));
1581 llvm::ConstantExpr::getBitCast(DefaultOpenMPPSource, CGM.Int8PtrTy);
2930 ID = llvm::ConstantExpr::getBitCast(Fn, CGM.Int8PtrTy);
2969 ID = llvm::ConstantExpr::getBitCast(Fn, CGM.Int8PtrTy);
4032 llvm::Constant *Data[] = {llvm::ConstantExpr::getBitCast(ID, CGM.VoidPtrTy),
4033 llvm::ConstantExpr::getBitCast(Str, CGM.Int8PtrTy),
6521 OutlinedFnID = llvm::ConstantExpr::getBitCast(OutlinedFn, CGM.Int8PtrTy);
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp 5132 auto *Replacement = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
5160 auto *Replacement = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
5196 llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(GV,
tools/clang/lib/CodeGen/CGVTT.cpp 82 llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr(
86 Init = llvm::ConstantExpr::getBitCast(Init, Int8PtrTy);
tools/clang/lib/CodeGen/CGVTables.cpp 462 Callee = llvm::ConstantExpr::getBitCast(Callee, Fn->getType());
535 llvm::ConstantExpr::getBitCast(ThunkFn, OldThunkFn->getType());
624 builder.add(llvm::ConstantExpr::getIntToPtr(
640 return builder.add(llvm::ConstantExpr::getBitCast(rtti, CGM.Int8PtrTy));
685 return llvm::ConstantExpr::getBitCast(fn, CGM.Int8PtrTy);
718 fnPtr = llvm::ConstantExpr::getBitCast(fnPtr, CGM.Int8PtrTy);
tools/clang/lib/CodeGen/CodeGenFunction.cpp 514 auto *GOTAsInt = llvm::ConstantExpr::getPtrToInt(GV, IntPtrTy);
515 auto *FuncAsInt = llvm::ConstantExpr::getPtrToInt(F, IntPtrTy);
516 auto *PCRelAsInt = llvm::ConstantExpr::getSub(GOTAsInt, FuncAsInt);
519 : llvm::ConstantExpr::getTrunc(PCRelAsInt, Int32Ty);
tools/clang/lib/CodeGen/CodeGenModule.cpp 242 auto *CE = cast<llvm::ConstantExpr>(Replacement);
242 auto *CE = cast<llvm::ConstantExpr>(Replacement);
330 if (auto CE = dyn_cast<llvm::ConstantExpr>(Aliasee))
351 Aliasee = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
1168 ctor.add(llvm::ConstantExpr::getBitCast(I.Initializer, CtorPFTy));
1170 ctor.add(llvm::ConstantExpr::getBitCast(I.AssociatedData, VoidPtrTy));
1908 llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
2215 llvm::ConstantExpr::getBitCast(GV, Int8PtrTy),
2216 llvm::ConstantExpr::getBitCast(AnnoGV, Int8PtrTy),
2217 llvm::ConstantExpr::getBitCast(UnitGV, Int8PtrTy),
2394 auto Ptr = llvm::ConstantExpr::getBitCast(Entry, DeclTy->getPointerTo(AS));
3158 return llvm::ConstantExpr::getBitCast(Entry, Ty->getPointerTo());
3198 llvm::Constant *BC = llvm::ConstantExpr::getBitCast(
3263 return llvm::ConstantExpr::getBitCast(F, PTy);
3451 return llvm::ConstantExpr::getAddrSpaceCast(Entry, Ty);
3456 return llvm::ConstantExpr::getBitCast(Entry, Ty);
3474 llvm::ConstantExpr::getBitCast(GV, Entry->getType());
3641 llvm::ConstantExpr::getBitCast(GV, OldGV->getType());
3970 llvm::ConstantExpr::getBitCast(GV, Entry->getType());
4271 if (auto *bitcast = dyn_cast<llvm::ConstantExpr>(user)) {
4271 if (auto *bitcast = dyn_cast<llvm::ConstantExpr>(user)) {
4493 Entry->replaceAllUsesWith(llvm::ConstantExpr::getBitCast(GA,
4566 Entry->replaceAllUsesWith(llvm::ConstantExpr::getBitCast(GIF,
4700 IsSwiftABI ? llvm::ConstantExpr::getPtrToInt(C, Ty)
4701 : llvm::ConstantExpr::getGetElementPtr(Ty, C, Zeros);
4712 Fields.add(cast<llvm::ConstantExpr>(CFConstantStringClassRef));
4758 llvm::ConstantExpr::getGetElementPtr(GV->getValueType(), GV, Zeros);
4762 Str = llvm::ConstantExpr::getBitCast(Str, Int8PtrTy);
tools/clang/lib/CodeGen/CodeGenPGO.cpp 902 llvm::Value *Args[] = {llvm::ConstantExpr::getBitCast(FuncNameVar, I8PtrTy),
934 llvm::ConstantExpr::getBitCast(FuncNameVar, Builder.getInt8PtrTy()),
tools/clang/lib/CodeGen/ConstantInitBuilder.cpp 98 llvm::ConstantExpr::getInBoundsGetElementPtr(
135 base = llvm::ConstantExpr::getPtrToInt(base, Builder.CGM.IntPtrTy);
136 target = llvm::ConstantExpr::getPtrToInt(target, Builder.CGM.IntPtrTy);
137 llvm::Constant *offset = llvm::ConstantExpr::getSub(target, base);
141 offset = llvm::ConstantExpr::getTrunc(offset, offsetType);
tools/clang/lib/CodeGen/CoverageMappingGen.cpp 1342 llvm::ConstantExpr::getBitCast(NamePtr, llvm::Type::getInt8PtrTy(Ctx)));
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp 912 return llvm::ConstantExpr::getNSWSub(src, adj);
914 return llvm::ConstantExpr::getNSWAdd(src, adj);
924 llvm::Constant *srcAdj = llvm::ConstantExpr::getExtractValue(src, 1);
927 dstAdj = llvm::ConstantExpr::getNSWSub(srcAdj, adj);
929 dstAdj = llvm::ConstantExpr::getNSWAdd(srcAdj, adj);
931 return llvm::ConstantExpr::getInsertValue(src, dstAdj, 1);
1009 MemPtr[0] = llvm::ConstantExpr::getPtrToInt(addr, CGM.PtrDiffTy);
1270 Dtor = llvm::ConstantExpr::getBitCast(Dtor, CGM.Int8PtrTy);
1711 return llvm::ConstantExpr::getGetElementPtr(VTable->getValueType(), VTable,
2401 llvm::Value *args[] = {llvm::ConstantExpr::getBitCast(
2403 llvm::ConstantExpr::getBitCast(addr, AddrInt8PtrTy),
2900 return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy);
3268 llvm::ConstantExpr::getInBoundsGetElementPtr(CGM.Int8PtrTy, VTable, Two);
3269 VTable = llvm::ConstantExpr::getBitCast(VTable, CGM.Int8PtrTy);
3342 return llvm::ConstantExpr::getBitCast(OldGV, CGM.Int8PtrTy);
3395 TypeNameField = llvm::ConstantExpr::getPtrToInt(TypeName, CGM.Int64Ty);
3398 TypeNameField = llvm::ConstantExpr::getAdd(TypeNameField, flag);
3400 llvm::ConstantExpr::getIntToPtr(TypeNameField, CGM.Int8PtrTy);
3402 TypeNameField = llvm::ConstantExpr::getBitCast(TypeName, CGM.Int8PtrTy);
3507 llvm::ConstantExpr::getBitCast(GV, OldGV->getType());
3546 return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy);
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp 542 llvm::ConstantExpr::getPtrToInt(getImageBase(), CGM.IntPtrTy);
544 llvm::ConstantExpr::getPtrToInt(PtrVal, CGM.IntPtrTy);
546 llvm::ConstantExpr::getSub(PtrValAsInt, ImageBaseAsInt,
548 return llvm::ConstantExpr::getTrunc(Diff, CGM.IntTy);
1827 llvm::Constant *VTableGEP = llvm::ConstantExpr::getInBoundsGetElementPtr(
2808 FirstField = llvm::ConstantExpr::getBitCast(FirstField, CGM.VoidPtrTy);
3608 ABI.getImageRelativeConstant(llvm::ConstantExpr::getInBoundsGetElementPtr(
3817 return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy);
3843 return llvm::ConstantExpr::getBitCast(Var, CGM.Int8PtrTy);
4037 CopyCtor = llvm::ConstantExpr::getBitCast(CopyCtor, CGM.Int8PtrTy);
4247 CleanupFn = llvm::ConstantExpr::getBitCast(
4254 llvm::ConstantExpr::getBitCast(CTA, CGM.Int8PtrTy));
tools/clang/lib/CodeGen/PatternInit.cpp 53 return llvm::ConstantExpr::getIntToPtr(Int, PtrTy);
tools/clang/lib/CodeGen/TargetInfo.cpp 463 return llvm::ConstantExpr::getPointerCast(Src, DestTy);
8048 return llvm::ConstantExpr::getAddrSpaceCast(
tools/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp 214 auto *ImageB = ConstantExpr::getGetElementPtr(Image->getValueType(),
216 auto *ImageE = ConstantExpr::getGetElementPtr(Image->getValueType(),
233 auto *ImagesB = ConstantExpr::getGetElementPtr(Images->getValueType(),
tools/lldb/source/Expression/IRInterpreter.cpp 257 if (const ConstantExpr *constant_expr =
258 dyn_cast<ConstantExpr>(constant)) {
267 ConstantExpr::const_op_iterator op_cursor = constant_expr->op_begin();
268 ConstantExpr::const_op_iterator op_end = constant_expr->op_end();
461 if (const ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) {
461 if (const ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) {
470 ConstantExpr::const_op_iterator op_cursor = constant_expr->op_begin();
tools/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp 252 return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)};
276 return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)};
454 if (llvm::ConstantExpr *const_expr =
455 llvm::dyn_cast<llvm::ConstantExpr>(value)) {
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp 484 CFSCWB_ty, ConstantExpr::getIntToPtr(CFSCWB_addr_int, CFSCWB_ptr_ty)};
493 Constant *bytes_arg = cstr ? ConstantExpr::getBitCast(cstr, i8_ptr_ty)
634 ConstantExpr *nsstring_expr = dyn_cast<ConstantExpr>(nsstring_member);
634 ConstantExpr *nsstring_expr = dyn_cast<ConstantExpr>(nsstring_member);
799 ConstantExpr *osr_initializer_expr = dyn_cast<ConstantExpr>(osr_initializer);
799 ConstantExpr *osr_initializer_expr = dyn_cast<ConstantExpr>(osr_initializer);
868 ConstantExpr::getIntToPtr(srN_addr_int, srN_ptr_ty)};
873 Constant *omvn_pointer = ConstantExpr::getBitCast(
957 ConstantExpr *ocr_initializer_expr = dyn_cast<ConstantExpr>(ocr_initializer);
957 ConstantExpr *ocr_initializer_expr = dyn_cast<ConstantExpr>(ocr_initializer);
1019 ConstantExpr::getIntToPtr(ogC_addr_int, ogC_ptr_ty)};
1024 Constant *ocn_pointer = ConstantExpr::getBitCast(
1190 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr)) {
1190 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr)) {
1301 ConstantExpr::getIntToPtr(symbol_addr_int, symbol_type);
1376 ConstantExpr::getIntToPtr(class_addr, load_instruction->getType());
1484 if (auto CE = dyn_cast<ConstantExpr>(V)) {
1554 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) {
1554 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) {
tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp 181 llvm::Constant *new_func_cast = llvm::ConstantExpr::getCast(
tools/llvm-diff/DifferenceEngine.cpp 395 if (isa<ConstantExpr>(L))
396 return equivalentAsOperands(cast<ConstantExpr>(L),
397 cast<ConstantExpr>(R));
426 bool equivalentAsOperands(ConstantExpr *L, ConstantExpr *R) {
426 bool equivalentAsOperands(ConstantExpr *L, ConstantExpr *R) {
unittests/Analysis/SparsePropagation.cpp 519 ConstantExpr::getCast(Instruction::BitCast, P, Builder.getInt8PtrTy());
unittests/IR/ConstantsTest.cpp 125 Constant *X = ConstantExpr::getUIToFP(Zero128, FP128Ty);
207 Constant *P0 = ConstantExpr::getPtrToInt(Global, Int32Ty);
208 Constant *P1 = ConstantExpr::getUIToFP(P0, FloatTy);
209 Constant *P2 = ConstantExpr::getUIToFP(P0, DoubleTy);
210 Constant *P3 = ConstantExpr::getTrunc(P0, Int1Ty);
211 Constant *P4 = ConstantExpr::getPtrToInt(Global2, Int32Ty);
212 Constant *P5 = ConstantExpr::getUIToFP(P4, FloatTy);
213 Constant *P6 = ConstantExpr::getBitCast(P4, VectorType::get(Int16Ty, 2));
313 Constant *GEP = ConstantExpr::getGetElementPtr(
336 Constant *GlobalInt = ConstantExpr::getPtrToInt(Global, IntTy);
360 Constant *Int1 = ConstantExpr::getPtrToInt(G1, IntTy);
361 Constant *Int2 = ConstantExpr::getPtrToInt(G2, IntTy);
381 auto *GEP = ConstantExpr::getGetElementPtr(IntTy, Placeholder, C1);
405 Constant *Aliasee = ConstantExpr::getBitCast(G, I16PTy);
474 auto *C = ConstantExpr::getBitCast(G, PtrTy);
493 ConstantExpr::getPtrToInt(Func, ConstantIntType));
496 bool result = ConstantExpr::get(Instruction::And, TheConstantExpr,
582 ConstantExpr::getPtrToInt(Global.get(), IntType));
unittests/IR/PatternMatch.cpp 512 Value *CNeg128 = ConstantExpr::getNeg(cast<Constant>(C128));
521 Value *CNegIntMin = ConstantExpr::getNeg(cast<Constant>(CIntMin));
unittests/Linker/LinkModulesTest.cpp 54 Constant *OnePtr = ConstantExpr::getCast(Instruction::IntToPtr, One,
usr/include/c++/7.4.0/type_traits 381 : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
1554 { typedef _Tp type; };
1558 { typedef _Tp type; };
1563 { typedef _Tp type; };
1574 remove_const<typename remove_volatile<_Tp>::type>::type type;
1983 { typedef _Up type; };