Lines Matching refs:Instruction
36 if (const Instruction *User = dyn_cast<Instruction>(U)) { in isUsedAsMemCpySource()
105 Instruction *Inst) { in getIntImmCostInst()
120 case Instruction::GetElementPtr: in getIntImmCostInst()
127 case Instruction::Store: in getIntImmCostInst()
137 case Instruction::ICmp: in getIntImmCostInst()
147 case Instruction::Add: in getIntImmCostInst()
148 case Instruction::Sub: in getIntImmCostInst()
158 case Instruction::Mul: in getIntImmCostInst()
165 case Instruction::Or: in getIntImmCostInst()
166 case Instruction::Xor: in getIntImmCostInst()
176 case Instruction::And: in getIntImmCostInst()
194 case Instruction::Shl: in getIntImmCostInst()
195 case Instruction::LShr: in getIntImmCostInst()
196 case Instruction::AShr: in getIntImmCostInst()
201 case Instruction::UDiv: in getIntImmCostInst()
202 case Instruction::SDiv: in getIntImmCostInst()
203 case Instruction::URem: in getIntImmCostInst()
204 case Instruction::SRem: in getIntImmCostInst()
205 case Instruction::Trunc: in getIntImmCostInst()
206 case Instruction::ZExt: in getIntImmCostInst()
207 case Instruction::SExt: in getIntImmCostInst()
208 case Instruction::IntToPtr: in getIntImmCostInst()
209 case Instruction::PtrToInt: in getIntImmCostInst()
210 case Instruction::BitCast: in getIntImmCostInst()
211 case Instruction::PHI: in getIntImmCostInst()
212 case Instruction::Call: in getIntImmCostInst()
213 case Instruction::Select: in getIntImmCostInst()
214 case Instruction::Ret: in getIntImmCostInst()
215 case Instruction::Load: in getIntImmCostInst()
303 NumStores += getMemoryOpCost(Instruction::Store, MemAccessTy, None, 0, in getUnrollingPreferences()
425 const Instruction *CxtI) { in getArithmeticInstrCost()
450 Opcode == Instruction::SDiv || Opcode == Instruction::SRem; in getArithmeticInstrCost()
452 Opcode == Instruction::UDiv || Opcode == Instruction::URem; in getArithmeticInstrCost()
475 if (Opcode == Instruction::FAdd || Opcode == Instruction::FSub || in getArithmeticInstrCost()
476 Opcode == Instruction::FMul || Opcode == Instruction::FDiv) in getArithmeticInstrCost()
480 if (Opcode == Instruction::FRem) in getArithmeticInstrCost()
485 if (Opcode == Instruction::Xor) { in getArithmeticInstrCost()
487 if (const Instruction *I = dyn_cast<Instruction>(A)) in getArithmeticInstrCost()
489 (I->getOpcode() == Instruction::And || in getArithmeticInstrCost()
490 I->getOpcode() == Instruction::Or || in getArithmeticInstrCost()
491 I->getOpcode() == Instruction::Xor)) in getArithmeticInstrCost()
495 else if (Opcode == Instruction::Or || Opcode == Instruction::And) { in getArithmeticInstrCost()
497 if (const Instruction *I = dyn_cast<Instruction>(A)) in getArithmeticInstrCost()
498 if (I->hasOneUse() && I->getOpcode() == Instruction::Xor) in getArithmeticInstrCost()
505 if (Opcode == Instruction::Or) in getArithmeticInstrCost()
508 if (Opcode == Instruction::Xor && ScalarBits == 1) { in getArithmeticInstrCost()
528 if (Opcode == Instruction::Shl || Opcode == Instruction::LShr || in getArithmeticInstrCost()
529 Opcode == Instruction::AShr) { in getArithmeticInstrCost()
550 if (Opcode == Instruction::FAdd || Opcode == Instruction::FSub || in getArithmeticInstrCost()
551 Opcode == Instruction::FMul || Opcode == Instruction::FDiv) { in getArithmeticInstrCost()
579 if (Opcode == Instruction::FRem) { in getArithmeticInstrCost()
715 static Type *getCmpOpsType(const Instruction *I, unsigned VF = 1) { in getCmpOpsType()
719 else if (Instruction *LogicI = dyn_cast<Instruction>(I->getOperand(0))) in getCmpOpsType()
743 const Instruction *I) { in getBoolVecToIntConversionCost()
752 if (Opcode == Instruction::ZExt || Opcode == Instruction::UIToFP) in getBoolVecToIntConversionCost()
762 const Instruction *I) { in getCastInstrCost()
775 if (Opcode == Instruction::SIToFP || Opcode == Instruction::UIToFP) { in getCastInstrCost()
782 if ((Opcode == Instruction::ZExt || Opcode == Instruction::SExt) && in getCastInstrCost()
790 if (Opcode == Instruction::SExt) in getCastInstrCost()
792 if (Opcode == Instruction::ZExt) in getCastInstrCost()
813 if (Opcode == Instruction::Trunc) { in getCastInstrCost()
819 if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt) { in getCastInstrCost()
822 if (Opcode == Instruction::ZExt) in getCastInstrCost()
840 if (Opcode == Instruction::SIToFP || Opcode == Instruction::UIToFP || in getCastInstrCost()
841 Opcode == Instruction::FPToSI || Opcode == Instruction::FPToUI) { in getCastInstrCost()
863 (Opcode == Instruction::SIToFP || Opcode == Instruction::UIToFP)) in getCastInstrCost()
866 (Opcode == Instruction::FPToSI || Opcode == Instruction::FPToUI)) in getCastInstrCost()
879 if (Opcode == Instruction::FPTrunc) { in getCastInstrCost()
887 if (Opcode == Instruction::FPExt) { in getCastInstrCost()
904 static unsigned getOperandsExtensionCost(const Instruction *I) { in getOperandsExtensionCost()
918 const Instruction *I) { in getCmpSelInstrCost()
924 case Instruction::ICmp: { in getCmpSelInstrCost()
940 case Instruction::Select: in getCmpSelInstrCost()
950 if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) { in getCmpSelInstrCost()
982 assert (Opcode == Instruction::Select); in getCmpSelInstrCost()
1003 if (Opcode == Instruction::InsertElement && Val->isIntOrIntVectorTy(64)) in getVectorInstrCost()
1006 if (Opcode == Instruction::ExtractElement) { in getVectorInstrCost()
1021 isFoldableLoad(const LoadInst *Ld, const Instruction *&FoldedValue) { in isFoldableLoad()
1025 const Instruction *UserI = cast<Instruction>(*Ld->user_begin()); in isFoldableLoad()
1041 UserI = cast<Instruction>(*UserI->user_begin()); in isFoldableLoad()
1044 if ((UserI->getOpcode() == Instruction::Sub || in isFoldableLoad()
1045 UserI->getOpcode() == Instruction::SDiv || in isFoldableLoad()
1046 UserI->getOpcode() == Instruction::UDiv) && in isFoldableLoad()
1054 case Instruction::Add: // SE: 16->32, 16/32->64, z14:16->64. ZE: 32->64 in isFoldableLoad()
1055 case Instruction::Sub: in isFoldableLoad()
1056 case Instruction::ICmp: in isFoldableLoad()
1060 case Instruction::Mul: // SE: 16->32, 32->64, z14:16->64 in isFoldableLoad()
1061 if (UserI->getOpcode() != Instruction::ICmp) { in isFoldableLoad()
1070 case Instruction::SDiv:// SE: 32->64 in isFoldableLoad()
1074 case Instruction::UDiv: in isFoldableLoad()
1075 case Instruction::And: in isFoldableLoad()
1076 case Instruction::Or: in isFoldableLoad()
1077 case Instruction::Xor: in isFoldableLoad()
1089 if (UserI->getOpcode() == Instruction::ICmp) in isFoldableLoad()
1100 if (const Instruction *I = dyn_cast<Instruction>(V)) in isBswapIntrinsicCall()
1112 const Instruction *I) { in getMemoryOpCost()
1119 if (!Src->isVectorTy() && Opcode == Instruction::Load && I != nullptr) { in getMemoryOpCost()
1121 const Instruction *FoldedValue = nullptr; in getMemoryOpCost()
1123 const Instruction *UserI = cast<Instruction>(*FoldedValue->user_begin()); in getMemoryOpCost()
1132 if (Instruction *OtherOp = dyn_cast<Instruction>(UserI->getOperand(i))){ in getMemoryOpCost()
1153 if (Opcode == Instruction::Load && I->hasOneUse()) { in getMemoryOpCost()
1154 const Instruction *LdUser = cast<Instruction>(*I->user_begin()); in getMemoryOpCost()
1197 if (Opcode == Instruction::Load) { in getInterleavedMemoryOpCost()