Lines Matching refs:CE

84   ConstantExpr *CE = cast<ConstantExpr>(C);
85 switch (CE->getOpcode()) {
88 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL);
94 if (DL.getTypeSizeInBits(CE->getType()) !=
95 DL.getTypeSizeInBits(CE->getOperand(0)->getType()))
97 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL);
101 for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i)
102 if (!isa<ConstantInt>(CE->getOperand(i)))
104 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL);
108 if (!isa<ConstantInt>(CE->getOperand(1)))
110 return isSimpleEnoughValueToCommit(CE->getOperand(0), SimpleConstants, DL);
141 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
143 if (CE->getOpcode() == Instruction::GetElementPtr &&
144 isa<GlobalVariable>(CE->getOperand(0)) &&
145 cast<GEPOperator>(CE)->isInBounds()) {
146 GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0));
153 ConstantInt *CI = dyn_cast<ConstantInt>(*std::next(CE->op_begin()));
158 if (!CE->isGEPWithNoNotionalOverIndexing())
161 return ConstantFoldLoadThroughGEPConstantExpr(GV->getInitializer(), CE);
166 } else if (CE->getOpcode() == Instruction::BitCast &&
167 isa<GlobalVariable>(CE->getOperand(0))) {
170 return cast<GlobalVariable>(CE->getOperand(0))->hasUniqueInitializer();
231 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) {
232 switch (CE->getOpcode()) {
235 if (auto *I = getInitializer(CE->getOperand(0)))
236 return ConstantFoldLoadThroughGEPConstantExpr(I, CE);
245 evaluateBitcastFromPtr(CE->getOperand(0), DL, TLI, findMemLoc);
247 Val = getInitializer(CE->getOperand(0));
275 auto *CE = dyn_cast<ConstantExpr>(V);
276 if (!CE || CE->getOpcode() != Instruction::BitCast ||
277 !getFormalParams(CS, getFunction(CE->getOperand(0)), Formals))
281 ConstantFoldLoadThroughBitcast(CE, CE->getOperand(0)->getType(), DL));
312 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr);
313 if (!RV || !CE || CE->getOpcode() != Instruction::BitCast)
317 dyn_cast<FunctionType>(CE->getType()->getPointerElementType())) {
364 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) {
365 if (CE->getOpcode() == Instruction::BitCast) {
385 evaluateBitcastFromPtr(CE->getOperand(0), DL, TLI, castValTy);