Lines Matching defs:FirstInst
25 Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0));
26 assert(isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst));
27 unsigned Opc = FirstInst->getOpcode();
28 Value *LHSVal = FirstInst->getOperand(0);
29 Value *RHSVal = FirstInst->getOperand(1);
36 dyn_cast<OverflowingBinaryOperator>(FirstInst)) {
40 dyn_cast<PossiblyExactOperator>(FirstInst))
55 if (CI->getPredicate() != cast<CmpInst>(FirstInst)->getPredicate())
79 Value *InLHS = FirstInst->getOperand(0);
80 Value *InRHS = FirstInst->getOperand(1);
84 FirstInst->getOperand(0)->getName() + ".pn");
92 FirstInst->getOperand(1)->getName() + ".pn");
113 if (CmpInst *CIOp = dyn_cast<CmpInst>(FirstInst)) {
116 NewCI->setDebugLoc(FirstInst->getDebugLoc());
120 BinaryOperator *BinOp = cast<BinaryOperator>(FirstInst);
126 NewBinOp->setDebugLoc(FirstInst->getDebugLoc());
131 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0));
133 SmallVector<Value*, 16> FixedOperands(FirstInst->op_begin(),
134 FirstInst->op_end());
149 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() ||
150 GEP->getNumOperands() != FirstInst->getNumOperands())
162 for (unsigned op = 0, e = FirstInst->getNumOperands(); op != e; ++op) {
163 if (FirstInst->getOperand(op) == GEP->getOperand(op))
171 if (isa<ConstantInt>(FirstInst->getOperand(op)) ||
175 if (FirstInst->getOperand(op)->getType() !=GEP->getOperand(op)->getType())
206 Value *FirstOp = FirstInst->getOperand(i);
234 NewGEP->setDebugLoc(FirstInst->getDebugLoc());
392 Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0));
394 if (isa<GetElementPtrInst>(FirstInst))
396 if (isa<LoadInst>(FirstInst))
407 if (isa<CastInst>(FirstInst)) {
408 CastSrcTy = FirstInst->getOperand(0)->getType();
416 } else if (isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)) {
419 ConstantOp = dyn_cast<Constant>(FirstInst->getOperand(1));
424 dyn_cast<OverflowingBinaryOperator>(FirstInst)) {
428 dyn_cast<PossiblyExactOperator>(FirstInst))
437 if (I == 0 || !I->hasOneUse() || !I->isSameOperationAs(FirstInst))
456 PHINode *NewPN = PHINode::Create(FirstInst->getOperand(0)->getType(),
460 Value *InVal = FirstInst->getOperand(0);
483 if (CastInst *FirstCI = dyn_cast<CastInst>(FirstInst)) {
486 NewCI->setDebugLoc(FirstInst->getDebugLoc());
490 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(FirstInst)) {
495 BinOp->setDebugLoc(FirstInst->getDebugLoc());
499 CmpInst *CIOp = cast<CmpInst>(FirstInst);
502 NewCI->setDebugLoc(FirstInst->getDebugLoc());