[PATCH] D48160: [SCEV] Simplify trunc-of-add/mul to add/mul-of-trunc under more circumstances.
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 20:38:29 PDT 2018
jlebar created this revision.
jlebar added a reviewer: sanjoy.
Herald added a subscriber: hiraditya.
Previously we would do this simplification only if it did not introduce
any new truncs (excepting new truncs which replace other cast ops).
This change weakens this condition: If the number of truncs stays the
same, but we're able to transform trunc(X + Y) to X + trunc(Y), that's
still simpler, and it may open up additional transformations.
While we're here, also clean up some duplicated code.
https://reviews.llvm.org/D48160
Files:
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/different-loops-recs.ll
llvm/test/Analysis/ScalarEvolution/max-trip-count-address-space.ll
llvm/test/Analysis/ScalarEvolution/sext-inreg.ll
llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll
llvm/test/Analysis/ScalarEvolution/trunc-simplify.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48160.151302.patch
Type: text/x-patch
Size: 8058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/ea602821/attachment.bin>
More information about the llvm-commits
mailing list