• Home
  • Raw
  • Download

Lines Matching refs:getOperand

26     Constant *Op0 = C->getOperand(0);  in CheapToScalarize()
28 if (C->getOperand(i) != Op0) in CheapToScalarize()
38 isa<ConstantInt>(I->getOperand(2))) in CheapToScalarize()
44 (CheapToScalarize(BO->getOperand(0), isConstant) || in CheapToScalarize()
45 CheapToScalarize(BO->getOperand(1), isConstant))) in CheapToScalarize()
49 (CheapToScalarize(CI->getOperand(0), isConstant) || in CheapToScalarize()
50 CheapToScalarize(CI->getOperand(1), isConstant))) in CheapToScalarize()
60 if (isa<ConstantAggregateZero>(SVI->getOperand(2))) in getShuffleMask()
62 if (isa<UndefValue>(SVI->getOperand(2))) in getShuffleMask()
66 const ConstantVector *CP = cast<ConstantVector>(SVI->getOperand(2)); in getShuffleMask()
90 return CP->getOperand(EltNo); in FindScalarElement()
94 if (!isa<ConstantInt>(III->getOperand(2))) in FindScalarElement()
96 unsigned IIElt = cast<ConstantInt>(III->getOperand(2))->getZExtValue(); in FindScalarElement()
101 return III->getOperand(1); in FindScalarElement()
105 return FindScalarElement(III->getOperand(0), EltNo); in FindScalarElement()
110 cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements(); in FindScalarElement()
115 return FindScalarElement(SVI->getOperand(0), InEl); in FindScalarElement()
116 return FindScalarElement(SVI->getOperand(1), InEl - LHSWidth); in FindScalarElement()
125 if (isa<UndefValue>(EI.getOperand(0))) in visitExtractElementInst()
129 if (isa<ConstantAggregateZero>(EI.getOperand(0))) in visitExtractElementInst()
132 if (ConstantVector *C = dyn_cast<ConstantVector>(EI.getOperand(0))) { in visitExtractElementInst()
136 Constant *op0 = C->getOperand(0); in visitExtractElementInst()
138 if (C->getOperand(i) != op0) { in visitExtractElementInst()
148 if (ConstantInt *IdxC = dyn_cast<ConstantInt>(EI.getOperand(1))) { in visitExtractElementInst()
160 if (EI.getOperand(0)->hasOneUse() && VectorWidth != 1) { in visitExtractElementInst()
164 if (Value *V = SimplifyDemandedVectorElts(EI.getOperand(0), in visitExtractElementInst()
171 if (Value *Elt = FindScalarElement(EI.getOperand(0), IndexVal)) in visitExtractElementInst()
177 if (BitCastInst *BCI = dyn_cast<BitCastInst>(EI.getOperand(0))) { in visitExtractElementInst()
179 dyn_cast<VectorType>(BCI->getOperand(0)->getType())) in visitExtractElementInst()
181 if (Value *Elt = FindScalarElement(BCI->getOperand(0), IndexVal)) in visitExtractElementInst()
186 if (Instruction *I = dyn_cast<Instruction>(EI.getOperand(0))) { in visitExtractElementInst()
191 CheapToScalarize(BO, isa<ConstantInt>(EI.getOperand(1)))) { in visitExtractElementInst()
193 Builder->CreateExtractElement(BO->getOperand(0), EI.getOperand(1), in visitExtractElementInst()
196 Builder->CreateExtractElement(BO->getOperand(1), EI.getOperand(1), in visitExtractElementInst()
202 if (IE->getOperand(2) == EI.getOperand(1)) in visitExtractElementInst()
203 return ReplaceInstUsesWith(EI, IE->getOperand(1)); in visitExtractElementInst()
206 if (isa<Constant>(IE->getOperand(2)) && isa<Constant>(EI.getOperand(1))) { in visitExtractElementInst()
207 Worklist.AddValue(EI.getOperand(0)); in visitExtractElementInst()
208 EI.setOperand(0, IE->getOperand(0)); in visitExtractElementInst()
214 if (ConstantInt *Elt = dyn_cast<ConstantInt>(EI.getOperand(1))) { in visitExtractElementInst()
218 cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements(); in visitExtractElementInst()
223 Src = SVI->getOperand(0); in visitExtractElementInst()
226 Src = SVI->getOperand(1); in visitExtractElementInst()
238 Value *EE = Builder->CreateExtractElement(CI->getOperand(0), in visitExtractElementInst()
276 Value *VecOp = IEI->getOperand(0); in CollectSingleShuffleElements()
277 Value *ScalarOp = IEI->getOperand(1); in CollectSingleShuffleElements()
278 Value *IdxOp = IEI->getOperand(2); in CollectSingleShuffleElements()
293 if (isa<ConstantInt>(EI->getOperand(1)) && in CollectSingleShuffleElements()
294 EI->getOperand(0)->getType() == V->getType()) { in CollectSingleShuffleElements()
296 cast<ConstantInt>(EI->getOperand(1))->getZExtValue(); in CollectSingleShuffleElements()
299 if (EI->getOperand(0) == LHS || EI->getOperand(0) == RHS) { in CollectSingleShuffleElements()
304 if (EI->getOperand(0) == LHS) { in CollectSingleShuffleElements()
309 assert(EI->getOperand(0) == RHS); in CollectSingleShuffleElements()
343 Value *VecOp = IEI->getOperand(0); in CollectShuffleElements()
344 Value *ScalarOp = IEI->getOperand(1); in CollectShuffleElements()
345 Value *IdxOp = IEI->getOperand(2); in CollectShuffleElements()
348 if (isa<ConstantInt>(EI->getOperand(1)) && isa<ConstantInt>(IdxOp) && in CollectShuffleElements()
349 EI->getOperand(0)->getType() == V->getType()) { in CollectShuffleElements()
351 cast<ConstantInt>(EI->getOperand(1))->getZExtValue(); in CollectShuffleElements()
356 if (EI->getOperand(0) == RHS || RHS == 0) { in CollectShuffleElements()
357 RHS = EI->getOperand(0); in CollectShuffleElements()
366 Value *V = CollectShuffleElements(EI->getOperand(0), Mask, RHS); in CollectShuffleElements()
378 if (CollectSingleShuffleElements(IEI, EI->getOperand(0), RHS, Mask)) in CollectShuffleElements()
379 return EI->getOperand(0); in CollectShuffleElements()
392 Value *VecOp = IE.getOperand(0); in visitInsertElementInst()
393 Value *ScalarOp = IE.getOperand(1); in visitInsertElementInst()
394 Value *IdxOp = IE.getOperand(2); in visitInsertElementInst()
403 if (isa<ConstantInt>(EI->getOperand(1)) && isa<ConstantInt>(IdxOp) && in visitInsertElementInst()
404 EI->getOperand(0)->getType() == IE.getType()) { in visitInsertElementInst()
407 cast<ConstantInt>(EI->getOperand(1))->getZExtValue(); in visitInsertElementInst()
418 if (EI->getOperand(0) == VecOp && ExtractedIdx == InsertedIdx) in visitInsertElementInst()
448 Value *LHS = SVI.getOperand(0); in visitShuffleVectorInst()
449 Value *RHS = SVI.getOperand(1); in visitShuffleVectorInst()
455 if (isa<UndefValue>(SVI.getOperand(2))) in visitShuffleVectorInst()
468 LHS = SVI.getOperand(0); in visitShuffleVectorInst()
469 RHS = SVI.getOperand(1); in visitShuffleVectorInst()
498 SVI.setOperand(0, SVI.getOperand(1)); in visitShuffleVectorInst()
501 LHS = SVI.getOperand(0); in visitShuffleVectorInst()
502 RHS = SVI.getOperand(1); in visitShuffleVectorInst()
566 return new ShuffleVectorInst(LHSSVI->getOperand(0), in visitShuffleVectorInst()
567 LHSSVI->getOperand(1), in visitShuffleVectorInst()