[llvm] LICM: hoist BO assoc when (C1 op LV) op C2 (PR #106999)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 02:41:32 PDT 2024


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

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

It is enough to add some representative test(s) using commuted operands, there should not be a commuted copy of every test. I think just one commuted test each for add and mul is sufficient here.

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.

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


More information about the llvm-commits mailing list