Lines Matching refs:getOperand
43 if (ConstantInt *RHS = dyn_cast<ConstantInt>(I->getOperand(1))) {
48 return I->getOperand(0);
55 return I->getOperand(0);
63 DecomposeSimpleLinearExpr(I->getOperand(0), SubScale, Offset);
112 DecomposeSimpleLinearExpr(AI.getOperand(0), ArraySizeScale, ArrayOffset);
180 Value *LHS = EvaluateInDifferentType(I->getOperand(0), Ty, isSigned);
181 Value *RHS = EvaluateInDifferentType(I->getOperand(1), Ty, isSigned);
191 if (I->getOperand(0)->getType() == Ty)
192 return I->getOperand(0);
196 Res = CastInst::CreateIntegerCast(I->getOperand(0), Ty,
200 Value *True = EvaluateInDifferentType(I->getOperand(1), Ty, isSigned);
201 Value *False = EvaluateInDifferentType(I->getOperand(2), Ty, isSigned);
202 Res = SelectInst::Create(I->getOperand(0), True, False);
235 Type *SrcTy = CI->getOperand(0)->getType(); // A from above
283 Value *Src = CI.getOperand(0);
292 return CastInst::Create(opc, CSrc->getOperand(0), CI.getType());
339 I->getOperand(0)->getType() == Ty)
355 return CanEvaluateTruncated(I->getOperand(0), Ty) &&
356 CanEvaluateTruncated(I->getOperand(1), Ty);
365 if (MaskedValueIsZero(I->getOperand(0), Mask) &&
366 MaskedValueIsZero(I->getOperand(1), Mask)) {
367 return CanEvaluateTruncated(I->getOperand(0), Ty) &&
368 CanEvaluateTruncated(I->getOperand(1), Ty);
376 if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) {
379 return CanEvaluateTruncated(I->getOperand(0), Ty);
386 if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) {
389 if (MaskedValueIsZero(I->getOperand(0),
392 return CanEvaluateTruncated(I->getOperand(0), Ty);
436 Value *Src = CI.getOperand(0);
506 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) {
515 Value *In = ICI->getOperand(0);
544 ComputeMaskedBits(ICI->getOperand(0), KnownZero, KnownOne);
561 Value *In = ICI->getOperand(0);
584 if (ICI->isEquality() && CI.getType() == ICI->getOperand(0)->getType()) {
587 Value *LHS = ICI->getOperand(0);
588 Value *RHS = ICI->getOperand(1);
654 if (0 && isa<TruncInst>(I) && I->getOperand(0)->getType() == Ty)
674 if (!CanEvaluateZExtd(I->getOperand(0), Ty, BitsToClear) ||
675 !CanEvaluateZExtd(I->getOperand(1), Ty, Tmp))
689 if (MaskedValueIsZero(I->getOperand(1),
700 if (ConstantInt *Amt = dyn_cast<ConstantInt>(I->getOperand(1))) {
701 if (!CanEvaluateZExtd(I->getOperand(0), Ty, BitsToClear))
711 if (!CanEvaluateZExtd(I->getOperand(1), Ty, Tmp) ||
712 !CanEvaluateZExtd(I->getOperand(2), Ty, BitsToClear) ||
755 Value *Src = CI.getOperand(0);
797 Value *A = CSrc->getOperand(0);
833 ICmpInst *LHS = dyn_cast<ICmpInst>(SrcI->getOperand(0));
834 ICmpInst *RHS = dyn_cast<ICmpInst>(SrcI->getOperand(1));
846 if (ConstantInt *C = dyn_cast<ConstantInt>(SrcI->getOperand(1)))
847 if (TruncInst *TI = dyn_cast<TruncInst>(SrcI->getOperand(0))) {
848 Value *TI0 = TI->getOperand(0);
857 if (ConstantInt *C = dyn_cast<ConstantInt>(SrcI->getOperand(1)))
858 if (BinaryOperator *And = dyn_cast<BinaryOperator>(SrcI->getOperand(0)))
860 And->getOperand(1) == C)
861 if (TruncInst *TI = dyn_cast<TruncInst>(And->getOperand(0))) {
862 Value *TI0 = TI->getOperand(0);
885 Value *Op0 = ICI->getOperand(0), *Op1 = ICI->getOperand(1);
916 Value *In = ICI->getOperand(0);
999 if (0 && isa<TruncInst>(I) && I->getOperand(0)->getType() == Ty)
1018 return CanEvaluateSExtd(I->getOperand(0), Ty) &&
1019 CanEvaluateSExtd(I->getOperand(1), Ty);
1025 return CanEvaluateSExtd(I->getOperand(1), Ty) &&
1026 CanEvaluateSExtd(I->getOperand(2), Ty);
1059 Value *Src = CI.getOperand(0);
1091 if (TI->hasOneUse() && TI->getOperand(0)->getType() == DestTy) {
1097 Value *Res = Builder->CreateShl(TI->getOperand(0), ShAmt, "sext");
1151 return LookThroughFPExtensions(I->getOperand(0));
1183 BinaryOperator *OpI = dyn_cast<BinaryOperator>(CI.getOperand(0));
1193 Value *LHSTrunc = LookThroughFPExtensions(OpI->getOperand(0));
1194 Value *RHSTrunc = LookThroughFPExtensions(OpI->getOperand(1));
1212 CallInst *Call = dyn_cast<CallInst>(CI.getOperand(0));
1222 Arg->getOperand(0)->getType()->isFloatTy()) {
1230 CallInst *ret = CallInst::Create(SqrtfFunc, Arg->getOperand(0),
1250 Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0));
1261 OpI->getOperand(0)->getType() == FI.getType() &&
1264 return ReplaceInstUsesWith(FI, OpI->getOperand(0));
1270 Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0));
1281 OpI->getOperand(0)->getType() == FI.getType() &&
1284 return ReplaceInstUsesWith(FI, OpI->getOperand(0));
1302 if (CI.getOperand(0)->getType()->getScalarSizeInBits() >
1304 Value *P = Builder->CreateTrunc(CI.getOperand(0),
1308 if (CI.getOperand(0)->getType()->getScalarSizeInBits() <
1310 Value *P = Builder->CreateZExt(CI.getOperand(0),
1324 Value *Src = CI.getOperand(0);
1334 CI.setOperand(0, GEP->getOperand(0));
1342 if (TD && GEP->hasOneUse() && isa<BitCastInst>(GEP->getOperand(0)) &&
1349 Value *OrigBase = cast<BitCastInst>(GEP->getOperand(0))->getOperand(0);
1379 Value *P = Builder->CreatePtrToInt(CI.getOperand(0),
1384 Value *P = Builder->CreatePtrToInt(CI.getOperand(0),
1524 return CollectInsertionElements(I->getOperand(0), ElementIndex,
1528 I->getOperand(0)->getType()->getPrimitiveSizeInBits(),
1531 return CollectInsertionElements(I->getOperand(0), ElementIndex,
1534 return CollectInsertionElements(I->getOperand(0), ElementIndex,
1536 CollectInsertionElements(I->getOperand(1), ElementIndex,
1540 ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1));
1545 return CollectInsertionElements(I->getOperand(0), ElementIndex+IndexShift,
1570 Value *IntInput = CI.getOperand(0);
1595 Value *Src = CI.getOperand(0);
1647 Value *Src = CI.getOperand(0);
1713 if (BitCastInst *BCIn = dyn_cast<BitCastInst>(SrcCast->getOperand(0)))
1714 if (isa<VectorType>(BCIn->getOperand(0)->getType()))
1715 if (Instruction *I = OptimizeVectorResize(BCIn->getOperand(0),
1744 cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements()) {
1749 if (((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(0))) &&
1750 Tmp->getOperand(0)->getType() == DestTy) ||
1751 ((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(1))) &&
1752 Tmp->getOperand(0)->getType() == DestTy)) {
1753 Value *LHS = Builder->CreateBitCast(SVI->getOperand(0), DestTy);
1754 Value *RHS = Builder->CreateBitCast(SVI->getOperand(1), DestTy);
1757 return new ShuffleVectorInst(LHS, RHS, SVI->getOperand(2));