[PATCH] D45453: [InstCombine] Enable Add/Sub simplifications with only 'reassoc' FMF

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 09:26:58 PDT 2018


spatel added a comment.

The tests here demonstrate the overlap between instcombine and reassociate, and based on feedback I've gotten, I'd say that https://reviews.llvm.org/rL170471 was a mistake for instcombine. It created a mini-reassociation pass within instcombine.

I've been cataloging, testing, and updating FP binop instcombines recently (eg, https://reviews.llvm.org/rL328502, https://reviews.llvm.org/rL329501), and the remaining big blob is FAddCombine() - which is poorly named because as shown in this patch, it's also called from visitFSub()...

I don't actually know everything that can happen in this code, but if others are confident that it's just reassociation (without need for nsz/nnan/ninf), then I suppose this is ok to loosen up. I'd still like to have dedicated tests in instcombine for whatever is happening in FAddCombine() though, so add to the tests from https://reviews.llvm.org/rL170471 to demonstrate at least some of the diffs without needing -reassociate?


https://reviews.llvm.org/D45453





More information about the llvm-commits mailing list