[PATCH] D60066: [llvm-exegesis][X86] Randomize CMOVcc/SETcc OPERAND_COND_CODE CondCodes
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 02:54:44 PDT 2019
gchatelet accepted this revision.
gchatelet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: tools/llvm-exegesis/lib/SnippetGenerator.cpp:156
static auto randomElement(const C &Container) -> decltype(Container[0]) {
- return Container[randomIndex(Container.size())];
+ assert(!Container.empty() && "Should have elements in container");
+ return Container[randomIndex(Container.size() - 1)];
----------------
"can't pick a random element from an empty container"
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60066/new/
https://reviews.llvm.org/D60066
More information about the llvm-commits
mailing list