Lines Matching refs:IE
243 } else if (InsertElementInst *IE = dyn_cast<InsertElementInst>(I)) {
245 if (IE->getOperand(2) == EI.getOperand(1))
246 return ReplaceInstUsesWith(EI, IE->getOperand(1));
249 if (isa<Constant>(IE->getOperand(2)) && isa<Constant>(EI.getOperand(1))) {
251 EI.setOperand(0, IE->getOperand(0));
442 Instruction *InstCombiner::visitInsertElementInst(InsertElementInst &IE) {
443 Value *VecOp = IE.getOperand(0);
444 Value *ScalarOp = IE.getOperand(1);
445 Value *IdxOp = IE.getOperand(2);
449 ReplaceInstUsesWith(IE, VecOp);
455 EI->getOperand(0)->getType() == IE.getType()) {
456 unsigned NumVectorElts = IE.getType()->getNumElements();
462 return ReplaceInstUsesWith(IE, VecOp);
465 return ReplaceInstUsesWith(IE, UndefValue::get(IE.getType()));
470 return ReplaceInstUsesWith(IE, VecOp);
474 if (!IE.hasOneUse() || !isa<InsertElementInst>(IE.use_back())) {
477 Value *LHS = CollectShuffleElements(&IE, Mask, RHS);
488 if (Value *V = SimplifyDemandedVectorElts(&IE, AllOnesEltMask, UndefElts)) {
489 if (V != &IE)
490 return ReplaceInstUsesWith(IE, V);
491 return &IE;