[SelectionDAG] replace duplicated peekThroughBitcast helper functions; NFCI
authorSanjay Patel <spatel@rotateright.com>
Thu, 20 Sep 2018 17:34:08 +0000 (17:34 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 20 Sep 2018 17:34:08 +0000 (17:34 +0000)
commit8a1227ccc8bd57096f6e7baac23bd7ad76653259
tree5ac00c545cca7f9ee00c99f1af9354654e72d6cf
parent8a9b3fe780205fbb94f06e157078b7fd76851e8a
[SelectionDAG] replace duplicated peekThroughBitcast helper functions; NFCI

x86 had 2 versions of peekThroughBitcast. DAGCombiner had 1. Plus, it had a 1-off implementation for the one-use variant.
Move the x86 versions of the code to SelectionDAG, so we don't have different copies of the code.
No functional change intended.

I'm putting this next to isBitwiseNot() because I am planning to use it in there. Another option is next to the
helpers in the ISD namespace (eg, ISD::isConstantSplatVector()). But if there's no good reason for those to be
there, I'd prefer to pull other helpers over to SelectionDAG in follow-up steps.

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

llvm-svn: 342669
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp