Home | History | Annotate | Download | only in IR

Lines Matching defs:CE

218   ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
219 if (CE == 0) return 0;
221 switch (CE->getOpcode()) {
224 Constant *RHS = ExtractConstantBytes(CE->getOperand(1), ByteStart,ByteSize);
233 Constant *LHS = ExtractConstantBytes(CE->getOperand(0), ByteStart,ByteSize);
239 Constant *RHS = ExtractConstantBytes(CE->getOperand(1), ByteStart,ByteSize);
247 Constant *LHS = ExtractConstantBytes(CE->getOperand(0), ByteStart,ByteSize);
253 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
264 return Constant::getNullValue(IntegerType::get(CE->getContext(),
268 return ExtractConstantBytes(CE->getOperand(0), ByteStart+ShAmt, ByteSize);
275 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1));
286 return Constant::getNullValue(IntegerType::get(CE->getContext(),
290 return ExtractConstantBytes(CE->getOperand(0), ByteStart-ShAmt, ByteSize);
298 cast<IntegerType>(CE->getOperand(0)->getType())->getBitWidth();
302 return Constant::getNullValue(IntegerType::get(CE->getContext(),
307 return CE->getOperand(0);
312 return ExtractConstantBytes(CE->getOperand(0), ByteStart, ByteSize);
318 Constant *Res = CE->getOperand(0);
527 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
528 if (CE->isCast()) {
530 if (unsigned newOpc = foldConstantCastPair(opc, CE, DestTy))
531 return ConstantExpr::getCast(newOpc, CE->getOperand(0), DestTy);
532 } else if (CE->getOpcode() == Instruction::GetElementPtr) {
536 for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i)
537 if (!CE->getOperand(i)->isNullValue()) {
543 return ConstantExpr::getPointerCast(CE->getOperand(0), DestTy);
610 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
611 if (CE->getOpcode() == Instruction::GetElementPtr &&
612 CE->getOperand(0)->isNullValue()) {
614 cast<PointerType>(CE->getOperand(0)->getType())->getElementType();
615 if (CE->getNumOperands() == 2) {
617 Constant *Idx = CE->getOperand(1);
625 } else if (CE->getNumOperands() == 3 &&
626 CE->getOperand(1)->isNullValue()) {
630 ConstantInt *CI = cast<ConstantInt>(CE->getOperand(2));
639 if (Constant *C = getFoldedOffsetOf(Ty, CE->getOperand(2),
1932 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
1937 if (CE->getOpcode() == Instruction::GetElementPtr) {
1939 for (gep_type_iterator I = gep_type_begin(CE), E = gep_type_end(CE);
1945 NewIndices.reserve(Idxs.size() + CE->getNumOperands());
1946 for (unsigned i = 1, e = CE->getNumOperands()-1; i != e; ++i)
1947 NewIndices.push_back(CE->getOperand(i));
1951 Constant *Combined = CE->getOperand(CE->getNumOperands()-1);
1969 ConstantExpr::getGetElementPtr(CE->getOperand(0), NewIndices,
1971 cast<GEPOperator>(CE)->isInBounds());
1984 if (CE->isCast() && Idxs.size() > 1 && Idx0->isNullValue()) {
1986 dyn_cast<PointerType>(CE->getOperand(0)->getType());
1987 PointerType *DstPtrTy = dyn_cast<PointerType>(CE->getType());
1996 return ConstantExpr::getGetElementPtr((Constant*)CE->getOperand(0),