[PATCH] D29777: [Reassociate] Convert shl by constant into multiply during tree linearization.
Chad Rosier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 11:14:42 PST 2017
mcrosier created this revision.
If we're linearizing a multiply expression, convert any left shift by a constant into a multiply, so they can be reassociated. We already do a similar optimization where we convert a negation into a multiply by -1.
See the test case for an example of what this hits.
Also, this addresses PR30256, which is a 4.0 release blocker.
Chad
https://reviews.llvm.org/D29777
Files:
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/basictest.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29777.87839.patch
Type: text/x-patch
Size: 5014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/b367e242/attachment.bin>
More information about the llvm-commits
mailing list