[DAGCombiner][x86] scalarize splatted vector FP ops
authorSanjay Patel <spatel@rotateright.com>
Fri, 5 Apr 2019 13:32:17 +0000 (13:32 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 5 Apr 2019 13:32:17 +0000 (13:32 +0000)
commit50a8652785226b6ae9de0f51d2f2415268f42c50
treea54cd2852cf8c304d9ae985a594546edc243908b
parent2b2f35a4e94c9da147bd5a07f23c776fdf17881f
[DAGCombiner][x86] scalarize splatted vector FP ops

There are a variety of vector patterns that may be profitably reduced to a
scalar op when scalar ops are performed using a subset (typically, the
first lane) of the vector register file.

For x86, this is true for float/double ops and element 0 because
insert/extract is just a sub-register rename.

Other targets should likely enable the hook in a similar way.

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

llvm-svn: 357760
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/test/CodeGen/X86/haddsub-shuf.ll
llvm/test/CodeGen/X86/scalarize-fp.ll