[PATCH] D49958: [MISC]Fix wrong usage of std::equal()

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 23:49:06 PDT 2018


shchenz added a comment.

In https://reviews.llvm.org/D49958#1202169, @lebedev.ri wrote:

> This looks good to me in principle. A few thoughts:
>
> 1. Would be great to have test coverage for [at least some of] this. **If** it is possible and reasonably easy of course.
> 2. I wonder if we should instead create a `llvm::is_splat()` helper and use it here?


@lebedev.ri  Hi Roman, thanks very much for your comments.
For 1, when I created this patch, I tried to add some testcase to expose the bug, but unfortunately failed. Since this is a obviously mistake of std::equal() and not related to compiler area, I leave it without test cases.
For 2, yes, it is a good idea to wrap it into a helper function. I have done it in new patch.

Could you help to have another look? Thanks again.


https://reviews.llvm.org/D49958





More information about the llvm-commits mailing list