[InstCombine] use m_APInt to allow icmp X, C folds for splat constant vectors
authorSanjay Patel <spatel@rotateright.com>
Fri, 19 Aug 2016 15:40:44 +0000 (15:40 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 19 Aug 2016 15:40:44 +0000 (15:40 +0000)
commit57b12d3876af84f1f394ab5183ec9fdfe15f45a5
treebaa82fd2c4927d96bb45b516cfedf4b72097fb58
parente1937bb524b7c6fd07f13a1ff42bc942fc05458e
[InstCombine] use m_APInt to allow icmp X, C folds for splat constant vectors

Of course, we really need to refactor and fix all of the cmp predicates,
but this one is interesting because without it, we later perform an
information-losing transform of icmp (shl 1, Y), C, and we can't recover
the better fold.

llvm-svn: 279263
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/icmp.ll