[PATCH] D45842: [Reassociate] swap binop operands to increase factoring potential

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 4 12:28:12 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D45842#1088136, @lebedev.ri wrote:

> Hmm, is only `test/Transforms/Reassociate/matching-binops.ll` regenerated here?
>  I'm wondering why https://reviews.llvm.org/D46336 changes so many more tests.


Yes, and this is intentional. I don't think we usually want to have IR regression tests that depend on multiple passes. Although in this case - because I've left the actual factoring/distributive optimization out of this patch (at least for now) - it may be worth adding tests under PhaseOrdering to make sure that nothing is interfering with this transform before instcombine has a chance to reduce it.


https://reviews.llvm.org/D45842





More information about the llvm-commits mailing list