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);
171 Instruction *visitFreeze(FreezeInst &I);
174 Instruction *visitInstruction(Instruction &I) { return nullptr; } in visitInstruction()
179 bool dominatesAllUses(const Instruction *DI, const Instruction *UI,
219 bool OptimizeOverflowCheck(Instruction::BinaryOps BinaryOp, bool IsSigned,
221 Instruction &CtxI, Value *&OperationResult,
224 Instruction *visitCallBase(CallBase &Call);
225 Instruction *tryOptimizeCall(CallInst *CI);
227 Instruction *transformCallThroughTrampoline(CallBase &Call,
231 Instruction *simplifyMaskedStore(IntrinsicInst &II);
232 Instruction *simplifyMaskedGather(IntrinsicInst &II);
233 Instruction *simplifyMaskedScatter(IntrinsicInst &II);
247 Instruction *transformZExtICmp(ICmpInst *ICI, ZExtInst &CI,
250 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
253 const Instruction &CxtI) const { in willNotOverflowSignedAdd()
259 const Instruction &CxtI) const { in willNotOverflowUnsignedAdd()
265 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowAdd()
271 const Instruction &CxtI) const { in willNotOverflowSignedSub()
277 const Instruction &CxtI) const { in willNotOverflowUnsignedSub()
283 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowSub()
289 const Instruction &CxtI) const { in willNotOverflowSignedMul()
295 const Instruction &CxtI) const { in willNotOverflowUnsignedMul()
301 const Instruction &CxtI, bool IsSigned) const { in willNotOverflowMul()
307 const Value *RHS, const Instruction &CxtI, in willNotOverflow()
310 case Instruction::Add: return willNotOverflowAdd(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
311 case Instruction::Sub: return willNotOverflowSub(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
312 case Instruction::Mul: return willNotOverflowMul(LHS, RHS, CxtI, IsSigned); in willNotOverflow()
318 Instruction *scalarizePHI(ExtractElementInst &EI, PHINode *PN);
319 Instruction *foldCastedBitwiseLogic(BinaryOperator &I);
320 Instruction *narrowBinOp(TruncInst &Trunc);
321 Instruction *narrowMaskedBinOp(BinaryOperator &And);
322 Instruction *narrowMathIfNoOverflow(BinaryOperator &I);
323 Instruction *narrowFunnelShift(TruncInst &Trunc);
324 Instruction *optimizeBitCastFromPhi(CastInst &CI, PHINode *PN);
325 Instruction *matchSAddSubSat(SelectInst &MinMax1);
339 Instruction::CastOps isEliminableCastPair(const CastInst *CI1,
356 Instruction *foldIntrinsicWithOverflowCommon(IntrinsicInst *II);
357 Instruction *foldFPSignBitOps(BinaryOperator &I);
364 Instruction *InsertNewInstBefore(Instruction *New, Instruction &Old) { in InsertNewInstBefore()
374 Instruction *InsertNewInstWith(Instruction *New, Instruction &Old) { in InsertNewInstWith()
385 Instruction *replaceInstUsesWith(Instruction &I, Value *V) { in replaceInstUsesWith()
406 Instruction *replaceOperand(Instruction &I, unsigned OpNum, Value *V) { in replaceOperand()
420 Instruction *CreateOverflowTuple(IntrinsicInst *II, Value *Result, in CreateOverflowTuple()
430 void CreateNonTerminatorUnreachable(Instruction *InsertAt) { in CreateNonTerminatorUnreachable()
443 Instruction *eraseInstFromFunction(Instruction &I) override { in eraseInstFromFunction()
451 if (auto *Inst = dyn_cast<Instruction>(Operand)) in eraseInstFromFunction()
461 unsigned Depth, const Instruction *CxtI) const { in computeKnownBits()
466 const Instruction *CxtI) const { in computeKnownBits()
472 const Instruction *CxtI = nullptr) {
477 const Instruction *CxtI = nullptr) const {
482 const Instruction *CxtI = nullptr) const {
488 const Instruction *CxtI) const { in computeOverflowForUnsignedMul()
494 const Instruction *CxtI) const { in computeOverflowForSignedMul()
500 const Instruction *CxtI) const { in computeOverflowForUnsignedAdd()
506 const Instruction *CxtI) const { in computeOverflowForSignedAdd()
512 const Instruction *CxtI) const { in computeOverflowForUnsignedSub()
517 const Instruction *CxtI) const { in computeOverflowForSignedSub()
522 Instruction::BinaryOps BinaryOp, bool IsSigned,
523 Value *LHS, Value *RHS, Instruction *CxtI) const;
552 Value *tryFactorization(BinaryOperator &, Instruction::BinaryOps, Value *,
567 unsigned Depth, Instruction *CxtI);
568 bool SimplifyDemandedBits(Instruction *I, unsigned Op,
575 Value *SimplifyMultipleUseDemandedBits(Instruction *I,
578 unsigned Depth, Instruction *CxtI);
583 Instruction *Shr, const APInt &ShrOp1, Instruction *Shl,
588 bool SimplifyDemandedInstructionBits(Instruction &Inst);
596 Instruction *foldVectorBinop(BinaryOperator &Inst);
597 Instruction *foldVectorSelect(SelectInst &Sel);
602 Instruction *foldOpIntoPhi(Instruction &I, PHINode *PN);
608 Instruction *FoldOpIntoSelect(Instruction &Op, SelectInst *SI);
611 Instruction *foldBinOpIntoSelectOrPhi(BinaryOperator &I);
613 Instruction *foldAddWithConstant(BinaryOperator &Add);
617 Instruction *foldPHIArgOpIntoPHI(PHINode &PN);
618 Instruction *foldPHIArgBinOpIntoPHI(PHINode &PN);
619 Instruction *foldPHIArgInsertValueInstructionIntoPHI(PHINode &PN);
620 Instruction *foldPHIArgExtractValueInstructionIntoPHI(PHINode &PN);
621 Instruction *foldPHIArgGEPIntoPHI(PHINode &PN);
622 Instruction *foldPHIArgLoadIntoPHI(PHINode &PN);
623 Instruction *foldPHIArgZextsIntoPHI(PHINode &PN);
628 Instruction *foldIntegerTypedPHI(PHINode &PN);
632 void PHIArgMergedDebugLoc(Instruction *Inst, PHINode &PN);
634 Instruction *foldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
635 ICmpInst::Predicate Cond, Instruction &I);
636 Instruction *foldAllocaCmp(ICmpInst &ICI, const AllocaInst *Alloca,
638 Instruction *foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
641 Instruction *foldFCmpIntToFPConst(FCmpInst &I, Instruction *LHSI,
643 Instruction *foldICmpAddOpConst(Value *X, const APInt &C,
645 Instruction *foldICmpWithCastOp(ICmpInst &ICI);
647 Instruction *foldICmpUsingKnownBits(ICmpInst &Cmp);
648 Instruction *foldICmpWithDominatingICmp(ICmpInst &Cmp);
649 Instruction *foldICmpWithConstant(ICmpInst &Cmp);
650 Instruction *foldICmpInstWithConstant(ICmpInst &Cmp);
651 Instruction *foldICmpInstWithConstantNotInt(ICmpInst &Cmp);
652 Instruction *foldICmpBinOp(ICmpInst &Cmp, const SimplifyQuery &SQ);
653 Instruction *foldICmpEquality(ICmpInst &Cmp);
654 Instruction *foldIRemByPowerOfTwoToBitTest(ICmpInst &I);
655 Instruction *foldSignBitTest(ICmpInst &I);
656 Instruction *foldICmpWithZero(ICmpInst &Cmp);
660 Instruction *foldICmpSelectConstant(ICmpInst &Cmp, SelectInst *Select,
662 Instruction *foldICmpTruncConstant(ICmpInst &Cmp, TruncInst *Trunc,
664 Instruction *foldICmpAndConstant(ICmpInst &Cmp, BinaryOperator *And,
666 Instruction *foldICmpXorConstant(ICmpInst &Cmp, BinaryOperator *Xor,
668 Instruction *foldICmpOrConstant(ICmpInst &Cmp, BinaryOperator *Or,
670 Instruction *foldICmpMulConstant(ICmpInst &Cmp, BinaryOperator *Mul,
672 Instruction *foldICmpShlConstant(ICmpInst &Cmp, BinaryOperator *Shl,
674 Instruction *foldICmpShrConstant(ICmpInst &Cmp, BinaryOperator *Shr,
676 Instruction *foldICmpSRemConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
678 Instruction *foldICmpUDivConstant(ICmpInst &Cmp, BinaryOperator *UDiv,
680 Instruction *foldICmpDivConstant(ICmpInst &Cmp, BinaryOperator *Div,
682 Instruction *foldICmpSubConstant(ICmpInst &Cmp, BinaryOperator *Sub,
684 Instruction *foldICmpAddConstant(ICmpInst &Cmp, BinaryOperator *Add,
686 Instruction *foldICmpAndConstConst(ICmpInst &Cmp, BinaryOperator *And,
688 Instruction *foldICmpAndShift(ICmpInst &Cmp, BinaryOperator *And,
690 Instruction *foldICmpShrConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
692 Instruction *foldICmpShlConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
695 Instruction *foldICmpBinOpEqualityWithConstant(ICmpInst &Cmp,
698 Instruction *foldICmpIntrinsicWithConstant(ICmpInst &ICI, IntrinsicInst *II,
700 Instruction *foldICmpEqIntrinsicWithConstant(ICmpInst &ICI, IntrinsicInst *II,
704 Instruction *foldSelectExtConst(SelectInst &Sel);
705 Instruction *foldSelectOpOp(SelectInst &SI, Instruction *TI, Instruction *FI);
706 Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
707 Instruction *foldSPFofSPF(Instruction *Inner, SelectPatternFlavor SPF1,
708 Value *A, Value *B, Instruction &Outer,
710 Instruction *foldSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
711 Instruction *foldSelectValueEquivalence(SelectInst &SI, ICmpInst &ICI);
715 Instruction *PromoteCastOfAllocation(BitCastInst &CI, AllocaInst &AI);
721 Instruction *matchBSwapOrBitReverse(BinaryOperator &Or, bool MatchBSwaps,
724 Instruction *SimplifyAnyMemTransfer(AnyMemTransferInst *MI);
725 Instruction *SimplifyAnyMemSet(AnyMemSetInst *MI);
737 SmallVector<Instruction *, NegatorMaxNodesSSO> NewInstructions;
758 using Result = std::pair<ArrayRef<Instruction *> /*NewInstructions*/,
761 std::array<Value *, 2> getSortedOperandsOfBinOp(Instruction *I);