diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-09-20 17:34:08 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-09-20 17:34:08 +0000 |
commit | 8a1227ccc8bd57096f6e7baac23bd7ad76653259 (patch) | |
tree | 5ac00c545cca7f9ee00c99f1af9354654e72d6cf /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | 8a9b3fe780205fbb94f06e157078b7fd76851e8a (diff) | |
download | bcm5719-llvm-8a1227ccc8bd57096f6e7baac23bd7ad76653259.tar.gz bcm5719-llvm-8a1227ccc8bd57096f6e7baac23bd7ad76653259.zip |
[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
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 2da9222877b..cc2a215213d 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5513,19 +5513,6 @@ static SDValue getShuffleVectorZeroOrUndef(SDValue V2, int Idx, return DAG.getVectorShuffle(VT, SDLoc(V2), V1, V2, MaskVec); } -static SDValue peekThroughBitcasts(SDValue V) { - while (V.getNode() && V.getOpcode() == ISD::BITCAST) - V = V.getOperand(0); - return V; -} - -static SDValue peekThroughOneUseBitcasts(SDValue V) { - while (V.getNode() && V.getOpcode() == ISD::BITCAST && - V.getOperand(0).hasOneUse()) - V = V.getOperand(0); - return V; -} - // Peek through EXTRACT_SUBVECTORs - typically used for AVX1 256-bit intops. static SDValue peekThroughEXTRACT_SUBVECTORs(SDValue V) { while (V.getOpcode() == ISD::EXTRACT_SUBVECTOR) |