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

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 21 13:19:01 PDT 2017


davide added a comment.

In https://reviews.llvm.org/D33338#760426, @spatel wrote:

> 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.


I do plan to work on them, but if you have some bandwidth, any help would be appreciated :)
Should we open a bug so that we don't forget?


https://reviews.llvm.org/D33338





More information about the llvm-commits mailing list