[InstCombine] add helper function for folds of icmp (shl 1, Y), C; NFCI
authorSanjay Patel <spatel@rotateright.com>
Thu, 18 Aug 2016 21:28:30 +0000 (21:28 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 18 Aug 2016 21:28:30 +0000 (21:28 +0000)
commit98cd99dfc671b78ff6d840d474ac9575ad3ea68b
tree51d2ea480ca0bc8e7af23aabbe246ea45bfa7550
parent2b25799bcc1296c1c97397a7c520e0a5b9b682ef
[InstCombine] add helper function for folds of icmp (shl 1, Y), C; NFCI

Clean up the existing code by:
1. Renaming variables
2. Adding local variables
3. Making it vector-safe

This is still guarded by a ConstantInt check, so no functional change is intended.
But this should be ready to go: if we move the ConstantInt check down, all of
these folds should do the right thing for vector types.

llvm-svn: 279150
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp