OSDN Git Service

[x86] Teach the vector comment parsing and printing to correctly handle
authorChandler Carruth <chandlerc@gmail.com>
Tue, 23 Sep 2014 11:15:19 +0000 (11:15 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 23 Sep 2014 11:15:19 +0000 (11:15 +0000)
commit4850be49a3d8b50eab2d3b9b2b2ade823194a5d0
tree295a9e1d1f0f86a858563cfb4a6eace05849bfc6
parent8f637786d825f631ecdd58e3c773f06505310048
[x86] Teach the vector comment parsing and printing to correctly handle
undef in the shuffle mask. This shows up when we're printing comments
during lowering and we still have an IR-level constant hanging around
that models undef.

A nice consequence of this is *much* prettier test cases where the undef
lanes actually show up as undef rather than as a particular set of
values. This also allows us to print shuffle comments in cases that use
undef such as the recently added variable VPERMILPS lowering. Now those
test cases have nice shuffle comments attached with their details.

The shuffle lowering for PSHUFB has been augmented to use undef, and the
shuffle combining has been augmented to comprehend it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218301 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/InstPrinter/X86InstComments.cpp
lib/Target/X86/Utils/X86ShuffleDecode.cpp
lib/Target/X86/Utils/X86ShuffleDecode.h
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86MCInstLower.cpp
test/CodeGen/X86/vector-shuffle-128-v16.ll
test/CodeGen/X86/vector-shuffle-256-v8.ll