OSDN Git Service

[InstCombine] fix wrong undef handling when converting select to shuffle
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 Apr 2017 18:39:53 +0000 (18:39 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 Apr 2017 18:39:53 +0000 (18:39 +0000)
commit2c5adb18ba8739f7a9171fe9600714170947522b
treeb893f2f36c5345394703ed50b12e208bd0341ac4
parentc5de42f38f5c536d69d5b51c0e6230261dec8ee1
[InstCombine] fix wrong undef handling when converting select to shuffle

As discussed in:
https://bugs.llvm.org/show_bug.cgi?id=32486
...the canonicalization of vector select to shufflevector does not hold up
when undef elements are present in the condition vector.

Try to make the undef handling clear in the code and the LangRef.

Differential Revision: https://reviews.llvm.org/D31980

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300092 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select.ll