Sanjay Patel 00352310aa [InstCombine] (X << Y) / X -> 1 << Y
...when the shift is known to not overflow with the matching
signed-ness of the division.

This closes an optimization gap caused by canonicalizing mul
by power-of-2 to shl as shown in PR35709:
https://bugs.llvm.org/show_bug.cgi?id=35709

Patch by Anton Bikineev!

Differential Revision: https://reviews.llvm.org/D42032



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323068 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-21 16:14:51 +00:00
..