Lines Matching refs:Instruction
36 if (const Instruction *User = dyn_cast<Instruction>(U)) { in isUsedAsMemCpySource()
106 Instruction *Inst) { in getIntImmCostInst()
121 case Instruction::GetElementPtr: in getIntImmCostInst()
128 case Instruction::Store: in getIntImmCostInst()
138 case Instruction::ICmp: in getIntImmCostInst()
148 case Instruction::Add: in getIntImmCostInst()
149 case Instruction::Sub: in getIntImmCostInst()
159 case Instruction::Mul: in getIntImmCostInst()
166 case Instruction::Or: in getIntImmCostInst()
167 case Instruction::Xor: in getIntImmCostInst()
177 case Instruction::And: in getIntImmCostInst()
195 case Instruction::Shl: in getIntImmCostInst()
196 case Instruction::LShr: in getIntImmCostInst()
197 case Instruction::AShr: in getIntImmCostInst()
202 case Instruction::UDiv: in getIntImmCostInst()
203 case Instruction::SDiv: in getIntImmCostInst()
204 case Instruction::URem: in getIntImmCostInst()
205 case Instruction::SRem: in getIntImmCostInst()
206 case Instruction::Trunc: in getIntImmCostInst()
207 case Instruction::ZExt: in getIntImmCostInst()
208 case Instruction::SExt: in getIntImmCostInst()
209 case Instruction::IntToPtr: in getIntImmCostInst()
210 case Instruction::PtrToInt: in getIntImmCostInst()
211 case Instruction::BitCast: in getIntImmCostInst()
212 case Instruction::PHI: in getIntImmCostInst()
213 case Instruction::Call: in getIntImmCostInst()
214 case Instruction::Select: in getIntImmCostInst()
215 case Instruction::Ret: in getIntImmCostInst()
216 case Instruction::Load: in getIntImmCostInst()
304 NumStores += getMemoryOpCost(Instruction::Store, MemAccessTy, in getUnrollingPreferences()
425 const Instruction *CxtI) { in getArithmeticInstrCost()
449 Opcode == Instruction::SDiv || Opcode == Instruction::SRem; in getArithmeticInstrCost()
451 Opcode == Instruction::UDiv || Opcode == Instruction::URem; in getArithmeticInstrCost()
474 if (Opcode == Instruction::FAdd || Opcode == Instruction::FSub || in getArithmeticInstrCost()
475 Opcode == Instruction::FMul || Opcode == Instruction::FDiv) in getArithmeticInstrCost()
479 if (Opcode == Instruction::FRem) in getArithmeticInstrCost()
484 if (Opcode == Instruction::Xor) { in getArithmeticInstrCost()
486 if (const Instruction *I = dyn_cast<Instruction>(A)) in getArithmeticInstrCost()
488 (I->getOpcode() == Instruction::Or || in getArithmeticInstrCost()
489 I->getOpcode() == Instruction::And || in getArithmeticInstrCost()
490 I->getOpcode() == Instruction::Xor)) in getArithmeticInstrCost()
493 (I->getOpcode() == Instruction::Or || ST->hasVectorEnhancements1()))) in getArithmeticInstrCost()
497 else if (Opcode == Instruction::And || Opcode == Instruction::Or) { in getArithmeticInstrCost()
499 if (const Instruction *I = dyn_cast<Instruction>(A)) in getArithmeticInstrCost()
500 if ((I->hasOneUse() && I->getOpcode() == Instruction::Xor) && in getArithmeticInstrCost()
503 (Opcode == Instruction::And || ST->hasVectorEnhancements1())))) in getArithmeticInstrCost()
510 if (Opcode == Instruction::Or) in getArithmeticInstrCost()
513 if (Opcode == Instruction::Xor && ScalarBits == 1) { in getArithmeticInstrCost()
533 if (Opcode == Instruction::Shl || Opcode == Instruction::LShr || in getArithmeticInstrCost()
534 Opcode == Instruction::AShr) { in getArithmeticInstrCost()
556 if (Opcode == Instruction::FAdd || Opcode == Instruction::FSub || in getArithmeticInstrCost()
557 Opcode == Instruction::FMul || Opcode == Instruction::FDiv) { in getArithmeticInstrCost()
586 if (Opcode == Instruction::FRem) { in getArithmeticInstrCost()
723 static Type *getCmpOpsType(const Instruction *I, unsigned VF = 1) { in getCmpOpsType()
727 else if (Instruction *LogicI = dyn_cast<Instruction>(I->getOperand(0))) in getCmpOpsType()
751 const Instruction *I) { in getBoolVecToIntConversionCost()
760 if (Opcode == Instruction::ZExt || Opcode == Instruction::UIToFP) in getBoolVecToIntConversionCost()
770 const Instruction *I) { in getCastInstrCost()
783 if (Opcode == Instruction::SIToFP || Opcode == Instruction::UIToFP) { in getCastInstrCost()
792 if ((Opcode == Instruction::FPToSI || Opcode == Instruction::FPToUI) && in getCastInstrCost()
796 if ((Opcode == Instruction::ZExt || Opcode == Instruction::SExt)) { in getCastInstrCost()
807 if (Opcode == Instruction::SExt) in getCastInstrCost()
809 if (Opcode == Instruction::ZExt) in getCastInstrCost()
820 if (Opcode == Instruction::ZExt && I != nullptr) in getCastInstrCost()
828 if (Opcode == Instruction::Trunc && isInt128InVR(Src) && I != nullptr) { in getCastInstrCost()
855 if (Opcode == Instruction::Trunc) { in getCastInstrCost()
861 if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt) { in getCastInstrCost()
864 if (Opcode == Instruction::ZExt) in getCastInstrCost()
882 if (Opcode == Instruction::SIToFP || Opcode == Instruction::UIToFP || in getCastInstrCost()
883 Opcode == Instruction::FPToSI || Opcode == Instruction::FPToUI) { in getCastInstrCost()
905 (Opcode == Instruction::SIToFP || Opcode == Instruction::UIToFP)) in getCastInstrCost()
908 (Opcode == Instruction::FPToSI || Opcode == Instruction::FPToUI)) in getCastInstrCost()
923 if (Opcode == Instruction::FPTrunc) { in getCastInstrCost()
932 if (Opcode == Instruction::FPExt) { in getCastInstrCost()
950 static unsigned getOperandsExtensionCost(const Instruction *I) { in getOperandsExtensionCost()
964 const Instruction *I) { in getCmpSelInstrCost()
970 case Instruction::ICmp: { in getCmpSelInstrCost()
986 case Instruction::Select: in getCmpSelInstrCost()
996 if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) { in getCmpSelInstrCost()
1028 assert (Opcode == Instruction::Select); in getCmpSelInstrCost()
1051 if (Opcode == Instruction::InsertElement && Val->isIntOrIntVectorTy(64)) in getVectorInstrCost()
1054 if (Opcode == Instruction::ExtractElement) { in getVectorInstrCost()
1069 isFoldableLoad(const LoadInst *Ld, const Instruction *&FoldedValue) { in isFoldableLoad()
1073 const Instruction *UserI = cast<Instruction>(*Ld->user_begin()); in isFoldableLoad()
1089 UserI = cast<Instruction>(*UserI->user_begin()); in isFoldableLoad()
1092 if ((UserI->getOpcode() == Instruction::Sub || in isFoldableLoad()
1093 UserI->getOpcode() == Instruction::SDiv || in isFoldableLoad()
1094 UserI->getOpcode() == Instruction::UDiv) && in isFoldableLoad()
1102 case Instruction::Add: // SE: 16->32, 16/32->64, z14:16->64. ZE: 32->64 in isFoldableLoad()
1103 case Instruction::Sub: in isFoldableLoad()
1104 case Instruction::ICmp: in isFoldableLoad()
1108 case Instruction::Mul: // SE: 16->32, 32->64, z14:16->64 in isFoldableLoad()
1109 if (UserI->getOpcode() != Instruction::ICmp) { in isFoldableLoad()
1118 case Instruction::SDiv:// SE: 32->64 in isFoldableLoad()
1122 case Instruction::UDiv: in isFoldableLoad()
1123 case Instruction::And: in isFoldableLoad()
1124 case Instruction::Or: in isFoldableLoad()
1125 case Instruction::Xor: in isFoldableLoad()
1137 if (UserI->getOpcode() == Instruction::ICmp) in isFoldableLoad()
1148 if (const Instruction *I = dyn_cast<Instruction>(V)) in isBswapIntrinsicCall()
1161 const Instruction *I) { in getMemoryOpCost()
1168 if (!Src->isVectorTy() && Opcode == Instruction::Load && I != nullptr) { in getMemoryOpCost()
1170 const Instruction *FoldedValue = nullptr; in getMemoryOpCost()
1172 const Instruction *UserI = cast<Instruction>(*FoldedValue->user_begin()); in getMemoryOpCost()
1181 if (Instruction *OtherOp = dyn_cast<Instruction>(UserI->getOperand(i))){ in getMemoryOpCost()
1211 if (Opcode == Instruction::Load && I->hasOneUse()) { in getMemoryOpCost()
1212 const Instruction *LdUser = cast<Instruction>(*I->user_begin()); in getMemoryOpCost()
1251 if (Opcode == Instruction::Load) { in getInterleavedMemoryOpCost()