[InstCombine] use constant pattern matchers with icmp+sext
authorSanjay Patel <spatel@rotateright.com>
Thu, 21 Jun 2018 17:51:44 +0000 (17:51 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 21 Jun 2018 17:51:44 +0000 (17:51 +0000)
commit3244537a3cb30e63fb49844db3afe132ff7defb4
treeab98757a31b9f0e1dc508fb89771c0fa0e7a61bd
parent5522e968ad60a7775bd033c5ef6eb326e03f1848
[InstCombine] use constant pattern matchers with icmp+sext

The previous code worked with vectors, but it failed when the
vector constants contained undef elements.
The matchers handle those cases.

llvm-svn: 335262
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/vec_sext.ll