Conversation
| template<typename T> | ||
| auto PickValueInArray(T &array) -> decltype(auto) { | ||
| return array[ConsumeIntegralInRange(static_cast<std::size_t>(0), std::size(array) - 1)]; | ||
| auto PickValueInArray(const std::initializer_list<T> &list) -> decltype(auto) { |
There was a problem hiding this comment.
Why decltype(auto) instead of simply T? What does that even mean? it's already auto? The signature that exists is perfectly fine IMO.
mcourteaux
left a comment
There was a problem hiding this comment.
Nice. Why does git not detect the file moves? It's treating it as a full new file.
| } | ||
| if (gen_cse) { | ||
| ops.emplace_back([&] { | ||
| return common_subexpression_elimination(random_expr(t, depth, overflow_undef)); |
There was a problem hiding this comment.
You probably won't produce many Lets if everything is random... 🤷🏻
There was a problem hiding this comment.
Maybe I misunderstood how lossless_cast did it, then?
There was a problem hiding this comment.
I think you did. The original fuzzer was keeping a list of Exprs that it had already generated, and picks random ones from it to combine larger expressions. That increases the chances of having common subexpressions. See the std::vector<Expr> exprs on top of the generator.
There was a problem hiding this comment.
Right... this will require some reimagining then.
Co-authored-by: Andrew Adams <anadams@adobe.com>
This PR moves the existing fuzz tests that were under test/correctness to test/fuzz, and integrates them into the fuzz test framework from #9050.
Checklist
performance.