InstCombine: FoldOrOfICmps harder
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 28 Nov 2014 19:58:29 +0000 (19:58 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 28 Nov 2014 19:58:29 +0000 (19:58 +0000)
commit3d6f80b619e3cfd5826c3a0215256829b26c09e6
treef5d5ab5007186e0a777568044e6ab7bccd7537fd
parent46d5bf29820569471399c81caa1870f04223d23f
InstCombine: FoldOrOfICmps harder

We may be in a situation where the icmps might not be near each other in
a tree of or instructions.  Try to dig out related compare instructions
and see if they combine.

N.B.  This won't fire on deep trees of compares because rewritting the
tree might end up creating a net increase of IR.  We may have to resort
to something more sophisticated if this is a real problem.

llvm-svn: 222928
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/or.ll