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);
109 Instruction *visitXor(BinaryOperator &I);
110 Instruction *visitShl(BinaryOperator &I);
114 Instruction *canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(
116 Instruction *foldVariableSignZeroExtensionOfVariableHighBitExtract(
118 Instruction *visitAShr(BinaryOperator &I);
119 Instruction *visitLShr(BinaryOperator &I);
120 Instruction *commonShiftTransforms(BinaryOperator &I);
121 Instruction *visitFCmpInst(FCmpInst &I);
123 Instruction *visitICmpInst(ICmpInst &I);
124 Instruction *FoldShiftByConstant(Value *Op0, Constant *Op1,
126 Instruction *commonCastTransforms(CastInst &CI);
127 Instruction *commonPointerCastTransforms(CastInst &CI);
128 Instruction *visitTrunc(TruncInst &CI);
129 Instruction *visitZExt(ZExtInst &CI);
130 Instruction *visitSExt(SExtInst &CI);
131 Instruction *visitFPTrunc(FPTruncInst &CI);
132 Instruction *visitFPExt(CastInst &CI);
133 Instruction *visitFPToUI(FPToUIInst &FI);
134 Instruction *visitFPToSI(FPToSIInst &FI);
135 Instruction *visitUIToFP(CastInst &CI);
136 Instruction *visitSIToFP(CastInst &CI);
137 Instruction *visitPtrToInt(PtrToIntInst &CI);
138 Instruction *visitIntToPtr(IntToPtrInst &CI);
139 Instruction *visitBitCast(BitCastInst &CI);
140 Instruction *visitAddrSpaceCast(AddrSpaceCastInst &CI);
141 Instruction *foldItoFPtoI(CastInst &FI);
142 Instruction *visitSelectInst(SelectInst &SI);
143 Instruction *visitCallInst(CallInst &CI);
144 Instruction *visitInvokeInst(InvokeInst &II);
145 Instruction *visitCallBrInst(CallBrInst &CBI);
147 Instruction *SliceUpIllegalIntegerPHI(PHINode &PN);
148 Instruction *visitPHINode(PHINode &PN);
149 Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
150 Instruction *visitAllocaInst(AllocaInst &AI);
151 Instruction *visitAllocSite(Instruction &FI);
152 Instruction *visitFree(CallInst &FI);
153 Instruction *visitLoadInst(LoadInst &LI);
154 Instruction *visitStoreInst(StoreInst &SI);
155 Instruction *visitAtomicRMWInst(AtomicRMWInst &SI);
156 Instruction *visitUnconditionalBranchInst(BranchInst &BI);
157 Instruction *visitBranchInst(BranchInst &BI);
158 Instruction *visitFenceInst(FenceInst &FI);
159 Instruction *visitSwitchInst(SwitchInst &SI);
160 Instruction *visitReturnInst(ReturnInst &RI);
161 Instruction *visitUnreachableInst(UnreachableInst &I);
162 Instruction *
164 Instruction *visitInsertValueInst(InsertValueInst &IV);
165 Instruction *visitInsertElementInst(InsertElementInst &IE);
166 Instruction *visitExtractElementInst(ExtractElementInst &EI);
167 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
168 Instruction *visitExtractValueInst(ExtractValueInst &EV);
169 Instruction *visitLandingPadInst(LandingPadInst &LI);
170 Instruction *visitVAEndInst(VAEndInst &I);
173 Instruction *visitFreeze(FreezeInst &I);
176 Instruction *visitInstruction(Instruction &I) { return nullptr; } in visitInstruction()
181 bool dominatesAllUses(const Instruction *DI, const Instruction *UI,
222 bool OptimizeOverflowCheck(Instruction::BinaryOps BinaryOp, bool IsSigned,
224 Instruction &CtxI, Value *&OperationResult,
227 Instruction *visitCallBase(CallBase &Call);
228 Instruction *tryOptimizeCall(CallInst *CI);
230 Instruction *transformCallThroughTrampoline(CallBase &Call,
234 Instruction *simplifyMaskedStore(IntrinsicInst &II);
235 Instruction *simplifyMaskedGather(IntrinsicInst &II);
236 Instruction *simplifyMaskedScatter(IntrinsicInst &II);
250 Instruction *transformZExtICmp(ICmpInst *ICI, ZExtInst &CI,
253 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
256 const Instruction &CxtI) const { in willNotOverflowSignedAdd()
262 const Instruction &CxtI) const { in willNotOverflowUnsignedAdd()
268 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowAdd()
274 const Instruction &CxtI) const { in willNotOverflowSignedSub()
280 const Instruction &CxtI) const { in willNotOverflowUnsignedSub()
286 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowSub()
292 const Instruction &CxtI) const { in willNotOverflowSignedMul()
298 const Instruction &CxtI) const { in willNotOverflowUnsignedMul()
304 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowMul()
310 const Value *RHS, const Instruction &CxtI, in willNotOverflow()
313 case Instruction::Add: return willNotOverflowAdd(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
314 case Instruction::Sub: return willNotOverflowSub(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
315 case Instruction::Mul: return willNotOverflowMul(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
321 Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
322 Instruction *foldCastedBitwiseLogic(BinaryOperator &I);
323 Instruction *narrowBinOp(TruncInst &Trunc);
324 Instruction *narrowMaskedBinOp(BinaryOperator &And);
325 Instruction *narrowMathIfNoOverflow(BinaryOperator &I);
326 Instruction *narrowFunnelShift(TruncInst &Trunc);
327 Instruction *optimizeBitCastFromPhi(CastInst &CI, PHINode *PN);
328 Instruction *matchSAddSubSat(SelectInst &MinMax1);
342 Instruction::CastOps isEliminableCastPair(const CastInst *CI1,
356 Instruction *CxtI, bool IsAnd,
361 Instruction *foldIntrinsicWithOverflowCommon(IntrinsicInst *II);
362 Instruction *foldFPSignBitOps(BinaryOperator &I);
368 Instruction *foldAndOrOfSelectUsingImpliedCond(Value *Op, SelectInst &SI,
376 Instruction *InsertNewInstBefore(Instruction *New, Instruction &Old) { in InsertNewInstBefore()
386 Instruction *InsertNewInstWith(Instruction *New, Instruction &Old) { in InsertNewInstWith()
397 Instruction *replaceInstUsesWith(Instruction &I, Value *V) { in replaceInstUsesWith()
418 Instruction *replaceOperand(Instruction &I, unsigned OpNum, Value *V) { in replaceOperand()
432 void CreateNonTerminatorUnreachable(Instruction *InsertAt) { in CreateNonTerminatorUnreachable()
445 Instruction *eraseInstFromFunction(Instruction &I) override { in eraseInstFromFunction()
453 if (auto *Inst = dyn_cast<Instruction>(Operand)) in eraseInstFromFunction()
463 unsigned Depth, const Instruction *CxtI) const { in computeKnownBits()
468 const Instruction *CxtI) const { in computeKnownBits()
474 const Instruction *CxtI = nullptr) {
479 const Instruction *CxtI = nullptr) const {
484 const Instruction *CxtI = nullptr) const {
490 const Instruction *CxtI) const { in computeOverflowForUnsignedMul()
496 const Instruction *CxtI) const { in computeOverflowForSignedMul()
502 const Instruction *CxtI) const { in computeOverflowForUnsignedAdd()
508 const Instruction *CxtI) const { in computeOverflowForSignedAdd()
514 const Instruction *CxtI) const { in computeOverflowForUnsignedSub()
519 const Instruction *CxtI) const { in computeOverflowForSignedSub()
524 Instruction::BinaryOps BinaryOp, bool IsSigned,
525 Value *LHS, Value *RHS, Instruction *CxtI) const;
554 Value *tryFactorization(BinaryOperator &, Instruction::BinaryOps, Value *,
569 unsigned Depth, Instruction *CxtI);
570 bool SimplifyDemandedBits(Instruction *I, unsigned Op,
577 Value *SimplifyMultipleUseDemandedBits(Instruction *I,
580 unsigned Depth, Instruction *CxtI);
585 Instruction *Shr, const APInt &ShrOp1, Instruction *Shl,
590 bool SimplifyDemandedInstructionBits(Instruction &Inst);
598 Instruction *foldVectorBinop(BinaryOperator &Inst);
599 Instruction *foldVectorSelect(SelectInst &Sel);
604 Instruction *foldOpIntoPhi(Instruction &I, PHINode *PN);
610 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
613 Instruction *foldBinOpIntoSelectOrPhi(BinaryOperator &I);
615 Instruction *foldAddWithConstant(BinaryOperator &Add);
619 Instruction *foldPHIArgOpIntoPHI(PHINode &PN);
620 Instruction *foldPHIArgBinOpIntoPHI(PHINode &PN);
621 Instruction *foldPHIArgInsertValueInstructionIntoPHI(PHINode &PN);
622 Instruction *foldPHIArgExtractValueInstructionIntoPHI(PHINode &PN);
623 Instruction *foldPHIArgGEPIntoPHI(PHINode &PN);
624 Instruction *foldPHIArgLoadIntoPHI(PHINode &PN);
625 Instruction *foldPHIArgZextsIntoPHI(PHINode &PN);
630 Instruction *foldIntegerTypedPHI(PHINode &PN);
634 void PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN);
636 Instruction *foldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
637 ICmpInst::Predicate Cond, Instruction &I);
638 Instruction *foldAllocaCmp(ICmpInst &ICI, const AllocaInst *Alloca,
640 Instruction *foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
643 Instruction *foldFCmpIntToFPConst(FCmpInst &I, Instruction *LHSI,
645 Instruction *foldICmpAddOpConst(Value *X, const APInt &C,
647 Instruction *foldICmpWithCastOp(ICmpInst &ICI);
649 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp);
650 Instruction *foldICmpWithDominatingICmp(ICmpInst &Cmp);
651 Instruction *foldICmpWithConstant(ICmpInst &Cmp);
652 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp);
653 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp);
654 Instruction *foldICmpBinOp(ICmpInst &Cmp, const SimplifyQuery &SQ);
655 Instruction *foldICmpEquality(ICmpInst &Cmp);
656 Instruction *foldIRemByPowerOfTwoToBitTest(ICmpInst &I);
657 Instruction *foldSignBitTest(ICmpInst &I);
658 Instruction *foldICmpWithZero(ICmpInst &Cmp);
662 Instruction *foldICmpSelectConstant(ICmpInst &Cmp, SelectInst *Select,
664 Instruction *foldICmpTruncConstant(ICmpInst &Cmp, TruncInst *Trunc,
666 Instruction *foldICmpAndConstant(ICmpInst &Cmp, BinaryOperator *And,
668 Instruction *foldICmpXorConstant(ICmpInst &Cmp, BinaryOperator *Xor,
670 Instruction *foldICmpOrConstant(ICmpInst &Cmp, BinaryOperator *Or,
672 Instruction *foldICmpMulConstant(ICmpInst &Cmp, BinaryOperator *Mul,
674 Instruction *foldICmpShlConstant(ICmpInst &Cmp, BinaryOperator *Shl,
676 Instruction *foldICmpShrConstant(ICmpInst &Cmp, BinaryOperator *Shr,
678 Instruction *foldICmpSRemConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
680 Instruction *foldICmpUDivConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
682 Instruction *foldICmpDivConstant(ICmpInst &Cmp, BinaryOperator *Div,
684 Instruction *foldICmpSubConstant(ICmpInst &Cmp, BinaryOperator *Sub,
686 Instruction *foldICmpAddConstant(ICmpInst &Cmp, BinaryOperator *Add,
688 Instruction *foldICmpAndConstConst(ICmpInst &Cmp, BinaryOperator *And,
690 Instruction *foldICmpAndShift(ICmpInst &Cmp, BinaryOperator *And,
692 Instruction *foldICmpShrConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
694 Instruction *foldICmpShlConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
697 Instruction *foldICmpBinOpEqualityWithConstant(ICmpInst &Cmp,
700 Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI, IntrinsicInst *II,
702 Instruction *foldICmpEqIntrinsicWithConstant(ICmpInst &ICI, IntrinsicInst *II,
706 Instruction *foldSelectExtConst(SelectInst &Sel);
707 Instruction *foldSelectOpOp(SelectInst &SI, Instruction *TI, Instruction *FI);
708 Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
709 Instruction *foldSPFofSPF(Instruction *Inner, SelectPatternFlavor SPF1,
710 Value *A, Value *B, Instruction &Outer,
712 Instruction *foldSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
713 Instruction *foldSelectValueEquivalence(SelectInst &SI, ICmpInst &ICI);
717 Instruction *PromoteCastOfAllocation(BitCastInst &CI, AllocaInst &AI);
723 Instruction *matchBSwapOrBitReverse(Instruction &I, bool MatchBSwaps,
726 Instruction *SimplifyAnyMemTransfer(AnyMemTransferInst *MI);
727 Instruction *SimplifyAnyMemSet(AnyMemSetInst *MI);
739 SmallVector<Instruction *, NegatorMaxNodesSSO> NewInstructions;
760 using Result = std::pair<ArrayRef<Instruction *> /*NewInstructions*/,
763 std::array<Value *, 2> getSortedOperandsOfBinOp(Instruction *I);