| 36 | } |
| 37 | |
| 38 | bool ExtInsConflict(const std::vector<uint32_t>& extIndices, |
| 39 | const Instruction* insInst, const uint32_t extOffset) { |
| 40 | if (extIndices.size() - extOffset == insInst->NumInOperands() - 2) |
| 41 | return false; |
| 42 | uint32_t extNumIndices = static_cast<uint32_t>(extIndices.size()) - extOffset; |
| 43 | uint32_t insNumIndices = insInst->NumInOperands() - 2; |
| 44 | uint32_t numIndices = std::min(extNumIndices, insNumIndices); |
| 45 | for (uint32_t i = 0; i < numIndices; ++i) |
| 46 | if (extIndices[i + extOffset] != insInst->GetSingleWordInOperand(i + 2)) |
| 47 | return false; |
| 48 | return true; |
| 49 | } |
| 50 | |
| 51 | } // namespace opt |
| 52 | } // namespace spvtools |
no test coverage detected