[llvm] [InstCombine] simplify `icmp pred x, ~x` (PR #73990)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 06:33:44 PDT 2024


================

----------------
nikic wrote:

I feel like there are bit too many tests here for such a simple transform :) See https://llvm.org/docs/InstCombineContributorGuide.html#general-testing-considerations:

> Add representative tests for each test category (discussed below), but don’t test all combinations of everything. If you have multi-use tests, and you have commuted tests, you shouldn’t also add commuted multi-use tests.

It's not necessary to have a variant of every test with -1 and -128. It's okay to have most tests with -1 and just one with -128.

Similarly, we don't need to have an i128 variant of every tests. It's again something where it's fine to test it just once.

https://github.com/llvm/llvm-project/pull/73990


More information about the llvm-commits mailing list