commit | df541601235ede978715cbdc24692e374a715442 | [log] [tgz] |
---|---|---|
author | Jakub Kuderski <jakub.kuderski@arm.com> | Tue Sep 08 10:03:17 2015 +0000 |
committer | Jakub Kuderski <jakub.kuderski@arm.com> | Tue Sep 08 10:03:17 2015 +0000 |
tree | 5044e46f2f0d40509324ba4e55482a78ea699346 | |
parent | 41517aa3f4e4d2212e6af71e7d97400fc137260c [diff] |
There is a trunc(lshr (zext A), Cst) optimization in InstCombineCasts that removes cast by performing the lshr on smaller types. However, currently there is no trunc(lshr (sext A), Cst) variant. This patch add such optimization by transforming trunc(lshr (sext A), Cst) to ashr A, Cst. Differential Revision: http://reviews.llvm.org/D12520 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246997 91177308-0d34-0410-b5e6-96231b3b80d8