[X86][SSE] Improve legal SHUFP and PSHUFD shuffle matching
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 15 Nov 2014 21:13:05 +0000 (21:13 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 15 Nov 2014 21:13:05 +0000 (21:13 +0000)
commit6d675f4e35cc50746f888f9bed5ba22a8a4aed34
tree281a819943386600e28697e9ca34109ad7e2ec5f
parent382338d988c0b33a7feb7a9541f30894d9846be9
[X86][SSE] Improve legal SHUFP and PSHUFD shuffle matching

Updated X86TargetLowering::isShuffleMaskLegal to match SHUFP masks with commuted inputs and PSHUFD masks that reference the second input.

As part of this I've refactored isPSHUFDMask to work in a more general manner and allow it to match against either the first or second input vector.

Differential Revision: http://reviews.llvm.org/D6287

llvm-svn: 222087
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
llvm/test/CodeGen/X86/vector-shuffle-combining.ll