[InstCombine] use m_APInt in foldICmpWithConstant; NFCI
authorSanjay Patel <spatel@rotateright.com>
Tue, 16 Aug 2016 16:08:11 +0000 (16:08 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 16 Aug 2016 16:08:11 +0000 (16:08 +0000)
commit1e5b2d1611fbaf46b004b80f3800729ec68b2a6b
tree4fd05a1a05b7209e5b3fbb5c60a3d0a0ea740618
parent23c2eac34dc4560a976be703ec7a45198abce12c
[InstCombine] use m_APInt in foldICmpWithConstant; NFCI

There's some formatting and pointer deref ugliness here that I intend to fix in
subsequent patches. The overall goal is to refactor the obnoxiously long switch
and incrementally remove the restriction to scalar types (allow folds for vector
splats). This patch introduces the use of m_APInt which means the RHSV reference
is now a pointer (and may have matched a vector splat), but the check of 'RHS'
remains, so vector folds are disallowed and no functional change is intended.

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