Reapply "InstCombine: Reduce trunc (shl x, K) width."
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 13 Sep 2016 19:43:57 +0000 (19:43 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 13 Sep 2016 19:43:57 +0000 (19:43 +0000)
commite2e6cfee610bd8583cd8c95ea333403cc053118f
tree315268200035c38596e8e2343b9e970752a35342
parentce7a9a47b278584cf7bc13d8755a9198a24e4669
Reapply "InstCombine: Reduce trunc (shl x, K) width."

This reapplies r272987 with a fix for infinitely looping
when the truncated value is another shift of a constant.

llvm-svn: 281379
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/2011-05-28-swapmulsub.ll
llvm/test/Transforms/InstCombine/icmp.ll
llvm/test/Transforms/InstCombine/trunc.ll