[PATCH] D156026: [InstCombine] Contracting x^2 + 2*x*y + y^2 to (x + y)^2
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 22 08:19:22 PDT 2023
nikic added reviewers: nikic, goldstein.w.n.
nikic added a comment.
Herald added a subscriber: StephenFan.
For tests, https://developers.redhat.com/articles/2022/12/20/how-contribute-llvm#writing_tests should give you a pretty good idea about our expectations for InstCombine tests. There will be quite a few "commuted" tests for this pattern (which your current implementation does not fully handle). You'll also want multi-use tests (which you need to guard against via one-use checks), tests with nuw/nsw flags (to test flag preservation) and negative tests (where the fold does not occur).
Please also attach alive2 proofs for the transform. I'd recommend splitting the FP part of this into a separate patch, as different people may need to look at that one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156026/new/
https://reviews.llvm.org/D156026
More information about the llvm-commits
mailing list