OSDN Git Service

[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)
commit0084b4209f8be379d64a17855a9d70522325d76c
treef449f75efcca67a1a08b944d1a8b5849e8f25df7
parent0ebd4a8ba5821376c37670cd61bbf822767ea6c9
[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.

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