Lines Matching full:instruction
91 // context (the context instruction provides that context). If an assume and
92 // the context instruction are not in the same block then the DT helps in
97 const Instruction *CxtI;
100 Query(AssumptionCache *AC = nullptr, const Instruction *CxtI = nullptr,
111 // Given the provided Value and, potentially, a context instruction, return
112 // the preferred context instruction (if any).
113 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
114 // If we've been provided with a context instruction, then use that (provided
119 // If the value is really an already-inserted instruction, then use that.
120 CxtI = dyn_cast<Instruction>(V);
133 AssumptionCache *AC, const Instruction *CxtI,
145 AssumptionCache *AC, const Instruction *CxtI,
156 const Instruction *CxtI,
166 AssumptionCache *AC, const Instruction *CxtI,
176 const Instruction *CxtI, const DominatorTree *DT) {
186 const Instruction *CxtI,
355 static bool isEphemeralValueOf(Instruction *I, const Value *E) {
391 static bool isAssumeLikeIntrinsic(const Instruction *I) {
414 Instruction *Inv = cast<Instruction>(V);
466 bool llvm::isValidAssumeForContext(const Instruction *I,
467 const Instruction *CxtI,
469 return ::isValidAssumeForContext(const_cast<Instruction *>(I),
481 inline match_combine_or<BinaryOp_match<LHS, RHS, Instruction::And>,
482 BinaryOp_match<RHS, LHS, Instruction::And>>
488 inline match_combine_or<BinaryOp_match<LHS, RHS, Instruction::Or>,
489 BinaryOp_match<RHS, LHS, Instruction::Or>>
495 inline match_combine_or<BinaryOp_match<LHS, RHS, Instruction::Xor>,
496 BinaryOp_match<RHS, LHS, Instruction::Xor>>
502 /// true (at the context instruction.) This is mostly a utility function for
569 /// all paths leading to the context instruction. In particular, look for
571 /// instruction. This does not do general dataflow.
581 Instruction *Cxt = const_cast<Instruction *>(Q.CxtI);
584 if (auto VI = dyn_cast<Instruction>(V))
592 // but not as well for things far from the context instruction (presuming a
598 // It does handle conditions far from the context instruction (e.g. early
625 // instruction. Finding a condition where one path dominates the context
627 // the context instruction we're actually interested in. Instead, we need
628 // to ensure that the taken *edge* dominates the context instruction.
658 // context instruction. Finding a condition where one path dominates
660 // merge before the context instruction we're actually interested in.
662 // instruction.
1066 case Instruction::Load:
1070 case Instruction::And: {
1081 case Instruction::Or: {
1091 case Instruction::Xor: {
1102 case Instruction::Mul: {
1108 case Instruction::UDiv: {
1126 case Instruction::Select:
1134 case Instruction::FPTrunc:
1135 case Instruction::FPExt:
1136 case Instruction::FPToUI:
1137 case Instruction::FPToSI:
1138 case Instruction::SIToFP:
1139 case Instruction::UIToFP:
1141 Instruction::PtrToInt:
1142 case Instruction::IntToPtr:
1143 case Instruction::AddrSpaceCast: // Pointers could be different sizes.
1145 case Instruction::ZExt:
1146 case Instruction::Trunc: {
1165 case Instruction::BitCast: {
1176 case Instruction::SExt: {
1194 case Instruction::Shl:
1204 case Instruction::LShr:
1218 case Instruction::AShr:
1236 case Instruction::Sub: {
1243 case Instruction::Add: {
1250 case Instruction::SRem:
1288 case Instruction::URem: {
1313 case Instruction::Alloca: {
1323 case Instruction::GetElementPtr: {
1324 // Analyze all of the subscripts of this getelementptr instruction
1371 case Instruction::PHI: {
1387 if (Opcode == Instruction::Add ||
1388 Opcode == Instruction::Sub ||
1389 Opcode == Instruction::And ||
1390 Opcode == Instruction::Or ||
1391 Opcode == Instruction::Mul) {
1450 case Instruction::Call:
1451 case Instruction::Invoke:
1452 if (MDNode *MD = cast<Instruction>(I)->getMetadata(LLVMContext::MD_range))
1480 case Instruction::ExtractValue:
1722 if (Instruction* I = dyn_cast<Instruction>(V)) {
1756 return isKnownNonZero(cast<Instruction>(V)->getOperand(0), DL, Depth, Q);
1892 case Instruction::SExt:
1896 case Instruction::SDiv: {
1914 case Instruction::SRem: {
1949 case Instruction::AShr: {
1959 case Instruction::Shl: {
1971 case Instruction::And:
1972 case Instruction::Or:
1973 case Instruction::Xor: // NOT is handled here.
1985 case Instruction::Select:
1991 case Instruction::Add:
2019 case Instruction::Sub:
2048 case Instruction::PHI: {
2067 case Instruction::Trunc:
2141 case Instruction::SExt:
2144 case Instruction::ZExt:
2147 case Instruction::Shl:
2148 case Instruction::Mul: {
2152 if (I->getOpcode() == Instruction::Shl) {
2242 if (I->getOpcode() == Instruction::FAdd)
2289 case Instruction::FMul:
2294 case Instruction::FAdd:
2295 case Instruction::FDiv:
2296 case Instruction::FRem:
2299 case Instruction::FPExt:
2300 case Instruction::FPTrunc:
2303 case Instruction::Call:
2399 Instruction *InsertBefore) {
2452 // insertvalue instruction somewhere).
2456 Instruction *InsertBefore) {
2474 Instruction *InsertBefore) {
2492 // Loop the indices for the insertvalue instruction in parallel with the
2541 // Add indices from the extract value instruction
2553 // or load instruction)
2575 } else if (Operator::getOpcode(Ptr) == Instruction::BitCast ||
2576 Operator::getOpcode(Ptr) == Instruction::AddrSpaceCast) {
2601 // If the value is a GEP instruction or constant expression, treat it as an
2632 // The GEP instruction, constant or instruction, must reference a global
2746 } else if (Operator::getOpcode(V) == Instruction::BitCast ||
2747 Operator::getOpcode(V) == Instruction::AddrSpaceCast) {
2755 if (Instruction *I = dyn_cast<Instruction>(V))
2823 case Instruction::UDiv:
2824 case Instruction::URem: {
2831 case Instruction::SDiv:
2832 case Instruction::SRem: {
2850 case Instruction::Load: {
2859 case Instruction::Call: {
2901 case Instruction::VAArg:
2902 case Instruction::Alloca:
2903 case Instruction::Invoke:
2904 case Instruction::PHI:
2905 case Instruction::Store:
2906 case Instruction::Ret:
2907 case Instruction::Br:
2908 case Instruction::IndirectBr:
2909 case Instruction::Switch:
2910 case Instruction::Unreachable:
2911 case Instruction::Fence:
2912 case Instruction::LandingPad:
2913 case Instruction::AtomicRMW:
2914 case Instruction::AtomicCmpXchg:
2915 case Instruction::Resume:
2951 const Instruction *CxtI,
3001 const Instruction *CxtI,
3013 // Create a simple add instruction, and insert it into the struct.
3019 // Create a simple add instruction, and insert it into the struct.