Tweaks to the icmp+sext-to-shifts optimization to address Frits' comments:
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 1 Apr 2011 22:22:11 +0000 (22:22 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 1 Apr 2011 22:22:11 +0000 (22:22 +0000)
commit5337fabdc4b585acbce8489a71e997d1dd0f6e92
tree2bed7bb3609cd133fd17c5a8e734082cab5d9add
parent0539c159fb6e3f8d09d4790d8d6a4615c26d3e98
Tweaks to the icmp+sext-to-shifts optimization to address Frits' comments:

- Localize the check if an icmp has one use to a place where we know we're
  introducing something that's likely more expensive than a sext from i1.
- Add an assert to make sure a case that would lead to a miscompilation is
  folded away earlier.
- Fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128744 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp