Lines Matching refs:Instruction

62       public InstVisitor<InstCombinerImpl, Instruction *> {
87 Instruction *visitFNeg(UnaryOperator &I);
88 Instruction *visitAdd(BinaryOperator &I);
89 Instruction *visitFAdd(BinaryOperator &I);
92 Instruction *visitSub(BinaryOperator &I);
93 Instruction *visitFSub(BinaryOperator &I);
94 Instruction *visitMul(BinaryOperator &I);
95 Instruction *visitFMul(BinaryOperator &I);
96 Instruction *visitURem(BinaryOperator &I);
97 Instruction *visitSRem(BinaryOperator &I);
98 Instruction *visitFRem(BinaryOperator &I);
100 Instruction *commonIRemTransforms(BinaryOperator &I);
101 Instruction *commonIDivTransforms(BinaryOperator &I);
102 Instruction *visitUDiv(BinaryOperator &I);
103 Instruction *visitSDiv(BinaryOperator &I);
104 Instruction *visitFDiv(BinaryOperator &I);
106 Instruction *visitAnd(BinaryOperator &I);
107 Instruction *visitOr(BinaryOperator &I);
108 Instruction *visitXor(BinaryOperator &I);
109 Instruction *visitShl(BinaryOperator &I);
113 Instruction *canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(
115 Instruction *foldVariableSignZeroExtensionOfVariableHighBitExtract(
117 Instruction *visitAShr(BinaryOperator &I);
118 Instruction *visitLShr(BinaryOperator &I);
119 Instruction *commonShiftTransforms(BinaryOperator &I);
120 Instruction *visitFCmpInst(FCmpInst &I);
122 Instruction *visitICmpInst(ICmpInst &I);
123 Instruction *FoldShiftByConstant(Value *Op0, Constant *Op1,
125 Instruction *commonCastTransforms(CastInst &CI);
126 Instruction *commonPointerCastTransforms(CastInst &CI);
127 Instruction *visitTrunc(TruncInst &CI);
128 Instruction *visitZExt(ZExtInst &CI);
129 Instruction *visitSExt(SExtInst &CI);
130 Instruction *visitFPTrunc(FPTruncInst &CI);
131 Instruction *visitFPExt(CastInst &CI);
132 Instruction *visitFPToUI(FPToUIInst &FI);
133 Instruction *visitFPToSI(FPToSIInst &FI);
134 Instruction *visitUIToFP(CastInst &CI);
135 Instruction *visitSIToFP(CastInst &CI);
136 Instruction *visitPtrToInt(PtrToIntInst &CI);
137 Instruction *visitIntToPtr(IntToPtrInst &CI);
138 Instruction *visitBitCast(BitCastInst &CI);
139 Instruction *visitAddrSpaceCast(AddrSpaceCastInst &CI);
140 Instruction *foldItoFPtoI(CastInst &FI);
141 Instruction *visitSelectInst(SelectInst &SI);
142 Instruction *visitCallInst(CallInst &CI);
143 Instruction *visitInvokeInst(InvokeInst &II);
144 Instruction *visitCallBrInst(CallBrInst &CBI);
146 Instruction *SliceUpIllegalIntegerPHI(PHINode &PN);
147 Instruction *visitPHINode(PHINode &PN);
148 Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
149 Instruction *visitAllocaInst(AllocaInst &AI);
150 Instruction *visitAllocSite(Instruction &FI);
151 Instruction *visitFree(CallInst &FI);
152 Instruction *visitLoadInst(LoadInst &LI);
153 Instruction *visitStoreInst(StoreInst &SI);
154 Instruction *visitAtomicRMWInst(AtomicRMWInst &SI);
155 Instruction *visitUnconditionalBranchInst(BranchInst &BI);
156 Instruction *visitBranchInst(BranchInst &BI);
157 Instruction *visitFenceInst(FenceInst &FI);
158 Instruction *visitSwitchInst(SwitchInst &SI);
159 Instruction *visitReturnInst(ReturnInst &RI);
160 Instruction *visitUnreachableInst(UnreachableInst &I);
161 Instruction *
163 Instruction *visitInsertValueInst(InsertValueInst &IV);
164 Instruction *visitInsertElementInst(InsertElementInst &IE);
165 Instruction *visitExtractElementInst(ExtractElementInst &EI);
166 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
167 Instruction *visitExtractValueInst(ExtractValueInst &EV);
168 Instruction *visitLandingPadInst(LandingPadInst &LI);
169 Instruction *visitVAEndInst(VAEndInst &I);
170 Instruction *visitFreeze(FreezeInst &I);
173 Instruction *visitInstruction(Instruction &I) { return nullptr; } in visitInstruction()
178 bool dominatesAllUses(const Instruction *DI, const Instruction *UI,
188 bool replacePointer(Instruction &I, Value *V);
223 bool OptimizeOverflowCheck(Instruction::BinaryOps BinaryOp, bool IsSigned,
225 Instruction &CtxI, Value *&OperationResult,
228 Instruction *visitCallBase(CallBase &Call);
229 Instruction *tryOptimizeCall(CallInst *CI);
231 Instruction *transformCallThroughTrampoline(CallBase &Call,
235 Instruction *simplifyMaskedStore(IntrinsicInst &II);
236 Instruction *simplifyMaskedGather(IntrinsicInst &II);
237 Instruction *simplifyMaskedScatter(IntrinsicInst &II);
251 Instruction *transformZExtICmp(ICmpInst *ICI, ZExtInst &CI,
254 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
257 const Instruction &CxtI) const { in willNotOverflowSignedAdd()
263 const Instruction &CxtI) const { in willNotOverflowUnsignedAdd()
269 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowAdd()
275 const Instruction &CxtI) const { in willNotOverflowSignedSub()
281 const Instruction &CxtI) const { in willNotOverflowUnsignedSub()
287 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowSub()
293 const Instruction &CxtI) const { in willNotOverflowSignedMul()
299 const Instruction &CxtI) const { in willNotOverflowUnsignedMul()
305 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowMul()
311 const Value *RHS, const Instruction &CxtI, in willNotOverflow()
314 case Instruction::Add: return willNotOverflowAdd(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
315 case Instruction::Sub: return willNotOverflowSub(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
316 case Instruction::Mul: return willNotOverflowMul(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
322 Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
323 Instruction *foldCastedBitwiseLogic(BinaryOperator &I);
324 Instruction *narrowBinOp(TruncInst &Trunc);
325 Instruction *narrowMaskedBinOp(BinaryOperator &And);
326 Instruction *narrowMathIfNoOverflow(BinaryOperator &I);
327 Instruction *narrowFunnelShift(TruncInst &Trunc);
328 Instruction *optimizeBitCastFromPhi(CastInst &CI, PHINode *PN);
329 Instruction *matchSAddSubSat(SelectInst &MinMax1);
341 Instruction::CastOps isEliminableCastPair(const CastInst *CI1,
358 Instruction *foldIntrinsicWithOverflowCommon(IntrinsicInst *II);
359 Instruction *foldFPSignBitOps(BinaryOperator &I);
366 Instruction *InsertNewInstBefore(Instruction *New, Instruction &Old) { in InsertNewInstBefore()
376 Instruction *InsertNewInstWith(Instruction *New, Instruction &Old) { in InsertNewInstWith()
387 Instruction *replaceInstUsesWith(Instruction &I, Value *V) { in replaceInstUsesWith()
407 Instruction *replaceOperand(Instruction &I, unsigned OpNum, Value *V) { in replaceOperand()
421 Instruction *CreateOverflowTuple(IntrinsicInst *II, Value *Result, in CreateOverflowTuple()
431 void CreateNonTerminatorUnreachable(Instruction *InsertAt) { in CreateNonTerminatorUnreachable()
444 Instruction *eraseInstFromFunction(Instruction &I) override { in eraseInstFromFunction()
452 if (auto *Inst = dyn_cast<Instruction>(Operand)) in eraseInstFromFunction()
462 unsigned Depth, const Instruction *CxtI) const { in computeKnownBits()
467 const Instruction *CxtI) const { in computeKnownBits()
473 const Instruction *CxtI = nullptr) {
478 const Instruction *CxtI = nullptr) const {
483 const Instruction *CxtI = nullptr) const {
489 const Instruction *CxtI) const { in computeOverflowForUnsignedMul()
495 const Instruction *CxtI) const { in computeOverflowForSignedMul()
501 const Instruction *CxtI) const { in computeOverflowForUnsignedAdd()
507 const Instruction *CxtI) const { in computeOverflowForSignedAdd()
513 const Instruction *CxtI) const { in computeOverflowForUnsignedSub()
518 const Instruction *CxtI) const { in computeOverflowForSignedSub()
523 Instruction::BinaryOps BinaryOp, bool IsSigned,
524 Value *LHS, Value *RHS, Instruction *CxtI) const;
553 Value *tryFactorization(BinaryOperator &, Instruction::BinaryOps, Value *,
568 unsigned Depth, Instruction *CxtI);
569 bool SimplifyDemandedBits(Instruction *I, unsigned Op,
576 Value *SimplifyMultipleUseDemandedBits(Instruction *I,
579 unsigned Depth, Instruction *CxtI);
584 Instruction *Shr, const APInt &ShrOp1, Instruction *Shl,
589 bool SimplifyDemandedInstructionBits(Instruction &Inst);
597 Instruction *foldVectorBinop(BinaryOperator &Inst);
598 Instruction *foldVectorSelect(SelectInst &Sel);
603 Instruction *foldOpIntoPhi(Instruction &I, PHINode *PN);
609 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
612 Instruction *foldBinOpIntoSelectOrPhi(BinaryOperator &I);
614 Instruction *foldAddWithConstant(BinaryOperator &Add);
618 Instruction *foldPHIArgOpIntoPHI(PHINode &PN);
619 Instruction *foldPHIArgBinOpIntoPHI(PHINode &PN);
620 Instruction *foldPHIArgInsertValueInstructionIntoPHI(PHINode &PN);
621 Instruction *foldPHIArgExtractValueInstructionIntoPHI(PHINode &PN);
622 Instruction *foldPHIArgGEPIntoPHI(PHINode &PN);
623 Instruction *foldPHIArgLoadIntoPHI(PHINode &PN);
624 Instruction *foldPHIArgZextsIntoPHI(PHINode &PN);
629 Instruction *foldIntegerTypedPHI(PHINode &PN);
633 void PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN);
635 Instruction *foldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
636 ICmpInst::Predicate Cond, Instruction &I);
637 Instruction *foldAllocaCmp(ICmpInst &ICI, const AllocaInst *Alloca,
639 Instruction *foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
642 Instruction *foldFCmpIntToFPConst(FCmpInst &I, Instruction *LHSI,
644 Instruction *foldICmpAddOpConst(Value *X, const APInt &C,
646 Instruction *foldICmpWithCastOp(ICmpInst &ICI);
648 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp);
649 Instruction *foldICmpWithDominatingICmp(ICmpInst &Cmp);
650 Instruction *foldICmpWithConstant(ICmpInst &Cmp);
651 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp);
652 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp);
653 Instruction *foldICmpBinOp(ICmpInst &Cmp, const SimplifyQuery &SQ);
654 Instruction *foldICmpEquality(ICmpInst &Cmp);
655 Instruction *foldIRemByPowerOfTwoToBitTest(ICmpInst &I);
656 Instruction *foldSignBitTest(ICmpInst &I);
657 Instruction *foldICmpWithZero(ICmpInst &Cmp);
661 Instruction *foldICmpSelectConstant(ICmpInst &Cmp, SelectInst *Select,
663 Instruction *foldICmpTruncConstant(ICmpInst &Cmp, TruncInst *Trunc,
665 Instruction *foldICmpAndConstant(ICmpInst &Cmp, BinaryOperator *And,
667 Instruction *foldICmpXorConstant(ICmpInst &Cmp, BinaryOperator *Xor,
669 Instruction *foldICmpOrConstant(ICmpInst &Cmp, BinaryOperator *Or,
671 Instruction *foldICmpMulConstant(ICmpInst &Cmp, BinaryOperator *Mul,
673 Instruction *foldICmpShlConstant(ICmpInst &Cmp, BinaryOperator *Shl,
675 Instruction *foldICmpShrConstant(ICmpInst &Cmp, BinaryOperator *Shr,
677 Instruction *foldICmpSRemConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
679 Instruction *foldICmpUDivConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
681 Instruction *foldICmpDivConstant(ICmpInst &Cmp, BinaryOperator *Div,
683 Instruction *foldICmpSubConstant(ICmpInst &Cmp, BinaryOperator *Sub,
685 Instruction *foldICmpAddConstant(ICmpInst &Cmp, BinaryOperator *Add,
687 Instruction *foldICmpAndConstConst(ICmpInst &Cmp, BinaryOperator *And,
689 Instruction *foldICmpAndShift(ICmpInst &Cmp, BinaryOperator *And,
691 Instruction *foldICmpShrConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
693 Instruction *foldICmpShlConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
696 Instruction *foldICmpBinOpEqualityWithConstant(ICmpInst &Cmp,
699 Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI, IntrinsicInst *II,
701 Instruction *foldICmpEqIntrinsicWithConstant(ICmpInst &ICI, IntrinsicInst *II,
705 Instruction *foldSelectExtConst(SelectInst &Sel);
706 Instruction *foldSelectOpOp(SelectInst &SI, Instruction *TI, Instruction *FI);
707 Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
708 Instruction *foldSPFofSPF(Instruction *Inner, SelectPatternFlavor SPF1,
709 Value *A, Value *B, Instruction &Outer,
711 Instruction *foldSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
712 Instruction *foldSelectValueEquivalence(SelectInst &SI, ICmpInst &ICI);
714 Instruction *OptAndOp(BinaryOperator *Op, ConstantInt *OpRHS,
719 Instruction *PromoteCastOfAllocation(BitCastInst &CI, AllocaInst &AI);
725 Instruction *matchBSwapOrBitReverse(BinaryOperator &Or, bool MatchBSwaps,
728 Instruction *SimplifyAnyMemTransfer(AnyMemTransferInst *MI);
729 Instruction *SimplifyAnyMemSet(AnyMemSetInst *MI);
741 SmallVector<Instruction *, NegatorMaxNodesSSO> NewInstructions;
762 using Result = std::pair<ArrayRef<Instruction *> /*NewInstructions*/,
765 std::array<Value *, 2> getSortedOperandsOfBinOp(Instruction *I);