commit | 9530f1886433d77bc203c366915a9ab3160c7efc | [log] [tgz] |
---|---|---|
author | Sanjay Patel <spatel@rotateright.com> | Sun Jan 21 16:14:51 2018 +0000 |
committer | Sanjay Patel <spatel@rotateright.com> | Sun Jan 21 16:14:51 2018 +0000 |
tree | 7713b04c77141e282a864a0e30e243e64ab4a143 | |
parent | 7a44e4d594c98b5998ebffc041490564953a3cb8 [diff] |
[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 llvm-svn: 323068