Lines Matching refs:getOperand
43 if (ConstantInt *RHS = dyn_cast<ConstantInt>(I->getOperand(1))) { in DecomposeSimpleLinearExpr()
48 return I->getOperand(0); in DecomposeSimpleLinearExpr()
55 return I->getOperand(0); in DecomposeSimpleLinearExpr()
63 DecomposeSimpleLinearExpr(I->getOperand(0), SubScale, Offset); in DecomposeSimpleLinearExpr()
118 DecomposeSimpleLinearExpr(AI.getOperand(0), ArraySizeScale, ArrayOffset); in PromoteCastOfAllocation()
186 Value *LHS = EvaluateInDifferentType(I->getOperand(0), Ty, isSigned); in EvaluateInDifferentType()
187 Value *RHS = EvaluateInDifferentType(I->getOperand(1), Ty, isSigned); in EvaluateInDifferentType()
197 if (I->getOperand(0)->getType() == Ty) in EvaluateInDifferentType()
198 return I->getOperand(0); in EvaluateInDifferentType()
202 Res = CastInst::CreateIntegerCast(I->getOperand(0), Ty, in EvaluateInDifferentType()
206 Value *True = EvaluateInDifferentType(I->getOperand(1), Ty, isSigned); in EvaluateInDifferentType()
207 Value *False = EvaluateInDifferentType(I->getOperand(2), Ty, isSigned); in EvaluateInDifferentType()
208 Res = SelectInst::Create(I->getOperand(0), True, False); in EvaluateInDifferentType()
241 Type *SrcTy = CI->getOperand(0)->getType(); // A from above in isEliminableCastPair()
292 Value *Src = CI.getOperand(0); in commonCastTransforms()
301 return CastInst::Create(opc, CSrc->getOperand(0), CI.getType()); in commonCastTransforms()
348 I->getOperand(0)->getType() == Ty) in CanEvaluateTruncated()
364 return CanEvaluateTruncated(I->getOperand(0), Ty) && in CanEvaluateTruncated()
365 CanEvaluateTruncated(I->getOperand(1), Ty); in CanEvaluateTruncated()
374 if (MaskedValueIsZero(I->getOperand(0), Mask) && in CanEvaluateTruncated()
375 MaskedValueIsZero(I->getOperand(1), Mask)) { in CanEvaluateTruncated()
376 return CanEvaluateTruncated(I->getOperand(0), Ty) && in CanEvaluateTruncated()
377 CanEvaluateTruncated(I->getOperand(1), Ty); in CanEvaluateTruncated()
385 if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) { in CanEvaluateTruncated()
388 return CanEvaluateTruncated(I->getOperand(0), Ty); in CanEvaluateTruncated()
395 if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) { in CanEvaluateTruncated()
398 if (MaskedValueIsZero(I->getOperand(0), in CanEvaluateTruncated()
401 return CanEvaluateTruncated(I->getOperand(0), Ty); in CanEvaluateTruncated()
445 Value *Src = CI.getOperand(0); in visitTrunc()
515 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp()
524 Value *In = ICI->getOperand(0); in transformZExtICmp()
553 ComputeMaskedBits(ICI->getOperand(0), KnownZero, KnownOne); in transformZExtICmp()
570 Value *In = ICI->getOperand(0); in transformZExtICmp()
593 if (ICI->isEquality() && CI.getType() == ICI->getOperand(0)->getType()) { in transformZExtICmp()
596 Value *LHS = ICI->getOperand(0); in transformZExtICmp()
597 Value *RHS = ICI->getOperand(1); in transformZExtICmp()
661 if (isa<TruncInst>(I) && I->getOperand(0)->getType() == Ty) in CanEvaluateZExtd()
681 if (!CanEvaluateZExtd(I->getOperand(0), Ty, BitsToClear) || in CanEvaluateZExtd()
682 !CanEvaluateZExtd(I->getOperand(1), Ty, Tmp)) in CanEvaluateZExtd()
696 if (MaskedValueIsZero(I->getOperand(1), in CanEvaluateZExtd()
707 if (ConstantInt *Amt = dyn_cast<ConstantInt>(I->getOperand(1))) { in CanEvaluateZExtd()
708 if (!CanEvaluateZExtd(I->getOperand(0), Ty, BitsToClear)) in CanEvaluateZExtd()
718 if (!CanEvaluateZExtd(I->getOperand(1), Ty, Tmp) || in CanEvaluateZExtd()
719 !CanEvaluateZExtd(I->getOperand(2), Ty, BitsToClear) || in CanEvaluateZExtd()
762 Value *Src = CI.getOperand(0); in visitZExt()
804 Value *A = CSrc->getOperand(0); in visitZExt()
840 ICmpInst *LHS = dyn_cast<ICmpInst>(SrcI->getOperand(0)); in visitZExt()
841 ICmpInst *RHS = dyn_cast<ICmpInst>(SrcI->getOperand(1)); in visitZExt()
853 if (ConstantInt *C = dyn_cast<ConstantInt>(SrcI->getOperand(1))) in visitZExt()
854 if (TruncInst *TI = dyn_cast<TruncInst>(SrcI->getOperand(0))) { in visitZExt()
855 Value *TI0 = TI->getOperand(0); in visitZExt()
864 if (ConstantInt *C = dyn_cast<ConstantInt>(SrcI->getOperand(1))) in visitZExt()
865 if (BinaryOperator *And = dyn_cast<BinaryOperator>(SrcI->getOperand(0))) in visitZExt()
867 And->getOperand(1) == C) in visitZExt()
868 if (TruncInst *TI = dyn_cast<TruncInst>(And->getOperand(0))) { in visitZExt()
869 Value *TI0 = TI->getOperand(0); in visitZExt()
892 Value *Op0 = ICI->getOperand(0), *Op1 = ICI->getOperand(1); in transformSExtICmp()
923 Value *In = ICI->getOperand(0); in transformSExtICmp()
1003 if (isa<TruncInst>(I) && I->getOperand(0)->getType() == Ty) in CanEvaluateSExtd()
1022 return CanEvaluateSExtd(I->getOperand(0), Ty) && in CanEvaluateSExtd()
1023 CanEvaluateSExtd(I->getOperand(1), Ty); in CanEvaluateSExtd()
1029 return CanEvaluateSExtd(I->getOperand(1), Ty) && in CanEvaluateSExtd()
1030 CanEvaluateSExtd(I->getOperand(2), Ty); in CanEvaluateSExtd()
1063 Value *Src = CI.getOperand(0); in visitSExt()
1095 if (TI->hasOneUse() && TI->getOperand(0)->getType() == DestTy) { in visitSExt()
1101 Value *Res = Builder->CreateShl(TI->getOperand(0), ShAmt, "sext"); in visitSExt()
1155 return LookThroughFPExtensions(I->getOperand(0)); in LookThroughFPExtensions()
1187 BinaryOperator *OpI = dyn_cast<BinaryOperator>(CI.getOperand(0)); in visitFPTrunc()
1197 Value *LHSTrunc = LookThroughFPExtensions(OpI->getOperand(0)); in visitFPTrunc()
1198 Value *RHSTrunc = LookThroughFPExtensions(OpI->getOperand(1)); in visitFPTrunc()
1216 Value *InnerTrunc = Builder->CreateFPTrunc(OpI->getOperand(1), in visitFPTrunc()
1222 IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI.getOperand(0)); in visitFPTrunc()
1242 CallInst *Call = dyn_cast<CallInst>(CI.getOperand(0)); in visitFPTrunc()
1252 Arg->getOperand(0)->getType()->isFloatTy()) { in visitFPTrunc()
1260 CallInst *ret = CallInst::Create(SqrtfFunc, Arg->getOperand(0), in visitFPTrunc()
1280 Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0)); in visitFPToUI()
1291 OpI->getOperand(0)->getType() == FI.getType() && in visitFPToUI()
1294 return ReplaceInstUsesWith(FI, OpI->getOperand(0)); in visitFPToUI()
1300 Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0)); in visitFPToSI()
1311 OpI->getOperand(0)->getType() == FI.getType() && in visitFPToSI()
1314 return ReplaceInstUsesWith(FI, OpI->getOperand(0)); in visitFPToSI()
1331 if (TD && CI.getOperand(0)->getType()->getScalarSizeInBits() != in visitIntToPtr()
1337 Value *P = Builder->CreateZExtOrTrunc(CI.getOperand(0), Ty); in visitIntToPtr()
1349 Value *Src = CI.getOperand(0); in commonPointerCastTransforms()
1359 CI.setOperand(0, GEP->getOperand(0)); in commonPointerCastTransforms()
1368 if (TD && GEP->hasOneUse() && isa<BitCastInst>(GEP->getOperand(0)) && in commonPointerCastTransforms()
1371 Value *OrigBase = cast<BitCastInst>(GEP->getOperand(0))->getOperand(0); in commonPointerCastTransforms()
1404 Value *P = Builder->CreatePtrToInt(CI.getOperand(0), Ty); in visitPtrToInt()
1542 return CollectInsertionElements(I->getOperand(0), ElementIndex, in CollectInsertionElements()
1546 I->getOperand(0)->getType()->getPrimitiveSizeInBits(), in CollectInsertionElements()
1549 return CollectInsertionElements(I->getOperand(0), ElementIndex, in CollectInsertionElements()
1552 return CollectInsertionElements(I->getOperand(0), ElementIndex, in CollectInsertionElements()
1554 CollectInsertionElements(I->getOperand(1), ElementIndex, in CollectInsertionElements()
1558 ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1)); in CollectInsertionElements()
1563 return CollectInsertionElements(I->getOperand(0), ElementIndex+IndexShift, in CollectInsertionElements()
1588 Value *IntInput = CI.getOperand(0); in OptimizeIntegerToVectorInsertions()
1613 Value *Src = CI.getOperand(0); in OptimizeIntToFloatBitCast()
1665 Value *Src = CI.getOperand(0); in visitBitCast()
1731 if (BitCastInst *BCIn = dyn_cast<BitCastInst>(SrcCast->getOperand(0))) in visitBitCast()
1732 if (isa<VectorType>(BCIn->getOperand(0)->getType())) in visitBitCast()
1733 if (Instruction *I = OptimizeVectorResize(BCIn->getOperand(0), in visitBitCast()
1760 dyn_cast<InsertElementInst>(CI.getOperand(0))) in visitBitCast()
1761 return CastInst::Create(Instruction::BitCast, IEI->getOperand(1), in visitBitCast()
1773 cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements()) { in visitBitCast()
1778 if (((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(0))) && in visitBitCast()
1779 Tmp->getOperand(0)->getType() == DestTy) || in visitBitCast()
1780 ((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(1))) && in visitBitCast()
1781 Tmp->getOperand(0)->getType() == DestTy)) { in visitBitCast()
1782 Value *LHS = Builder->CreateBitCast(SVI->getOperand(0), DestTy); in visitBitCast()
1783 Value *RHS = Builder->CreateBitCast(SVI->getOperand(1), DestTy); in visitBitCast()
1786 return new ShuffleVectorInst(LHS, RHS, SVI->getOperand(2)); in visitBitCast()