[SelectionDAG] allow undefs when matching splat constants
authorSanjay Patel <spatel@rotateright.com>
Fri, 5 Oct 2018 17:42:19 +0000 (17:42 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 5 Oct 2018 17:42:19 +0000 (17:42 +0000)
commitf6a160a1023079f02e89917c6d7a74f90f12e23c
tree6336b58521061a26f39d4a8bb42a0b2d7cbd0fc0
parent7875142b5c02eec06aeb6be5ffe18ca71a0dfeab
[SelectionDAG] allow undefs when matching splat constants

And use that to transform fsub with zero constant operands.
The integer part isn't used yet, but it is proposed for use in
D44548, so adding both enhancements here makes that
patch simpler.

llvm-svn: 343865
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/vec_fneg.ll