[PATCH] D33338: [InstCombineCasts] Take in account final size when transforming sext->lshr->trunc patterns

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 21 08:22:57 PDT 2017


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

This is strictly safer (does the transform less often), so LGTM. Bonus: we're not creating an unnecessary cast in the case where the result size is the same as the source op.

@davide, let me know if you plan to work on the (lshr (sext X), C) patterns. I checked in the tests with https://reviews.llvm.org/rL303504.


https://reviews.llvm.org/D33338





More information about the llvm-commits mailing list