[X86] Match PSADBW in straight-line code
authorMichael Kuperstein <mkuper@google.com>
Fri, 29 Jul 2016 21:45:51 +0000 (21:45 +0000)
committerMichael Kuperstein <mkuper@google.com>
Fri, 29 Jul 2016 21:45:51 +0000 (21:45 +0000)
commitf396b4c40dad7df67f7cadc6aaa7ac3dbf42f866
tree41d0f8a47ae92af93d0f516baf1b311c630678dd
parente9ac9b9aaf51c49e54f9f3664cb6b5e28cae0c39
[X86] Match PSADBW in straight-line code

Up until now, we only had code to match PSADBW patterns that look like what
comes out of the loop vectorizer - a partial reduction inside the loop body
that gets fed into a horizontal operation in a different basic block.

This adds support for straight-line patterns, like those generated by the
SLP vectorizer.

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

llvm-svn: 277219
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/sad.ll