[PATCH] D132412: [InstCombine] ease use constraint in tryFactorization()
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 15:47:40 PDT 2022
spatel updated this revision to Diff 454992.
spatel retitled this revision from "[InstCombine] reassociate/factor add+mul with common operand" to "[InstCombine] ease use constraint in tryFactorization()".
spatel edited the summary of this revision.
spatel added a comment.
Patch updated:
Adjust the use checks in tryFactorization() to handle the motivating patterns. This also changes some existing tests with multi-uses that we ignored before. Those look like good changes to me for the same reason cited before - it reduces uses of variables.
Also, I didn't remember that we have code that tries to propagate nsw/nuw through those folds. It is there, but incomplete as noted with the TODO items in the subtract tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132412/new/
https://reviews.llvm.org/D132412
Files:
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/add.ll
llvm/test/Transforms/InstCombine/and-or.ll
llvm/test/Transforms/InstCombine/ctpop.ll
llvm/test/Transforms/InstCombine/sub.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132412.454992.patch
Type: text/x-patch
Size: 9623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220823/7a9b3b4e/attachment.bin>
More information about the llvm-commits
mailing list