[InstCombine] add helper functions for foldICmpWithConstant; NFCI
authorSanjay Patel <spatel@rotateright.com>
Tue, 16 Aug 2016 17:54:36 +0000 (17:54 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 16 Aug 2016 17:54:36 +0000 (17:54 +0000)
commita3f4f0828bb791d2b7b396ccc61a95f4b0e76ba6
treeddb72e1da1e7f9666527bc83bb324962182acb8d
parent5cd57177a51abc7b0bfe18f70566572dbccab9a0
[InstCombine] add helper functions for foldICmpWithConstant; NFCI

Besides breaking up a 700 line function to improve readability,
this sinks the 'FIXME: ConstantInt' check into each helper. So
now we can independently break that restriction within any of the
helper functions.

As much as possible, the code was only {cut/paste/clang-format}'ed
to minimize risk (no functional changes intended), so several more
readability improvements are still possible.

llvm-svn: 278828
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h