We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a65d8c5 commit f80b630Copy full SHA for f80b630
mlir/lib/Rewrite/ByteCode.cpp
@@ -769,8 +769,10 @@ class ByteCodeExecutor {
769
770
// Check to see if the attribute value is within the case list. Jump to
771
// the correct successor index based on the result.
772
- auto it = llvm::find(cases, value);
773
- selectJump(it == cases.end() ? size_t(0) : ((it - cases.begin()) + 1));
+ for (auto it = cases.begin(), e = cases.end(); it != e; ++it)
+ if (*it == value)
774
+ return selectJump(size_t((it - cases.begin()) + 1));
775
+ selectJump(size_t(0));
776
}
777
778
/// Internal implementation of reading various data types from the bytecode
0 commit comments