[X86] Use SelectionDAG::SplitVectorOperand to simplify some code. NFC
authorCraig Topper <craig.topper@intel.com>
Mon, 26 Feb 2018 02:16:34 +0000 (02:16 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 26 Feb 2018 02:16:34 +0000 (02:16 +0000)
llvm-svn: 326065

llvm/lib/Target/X86/X86ISelLowering.cpp

index e1fc9a2..504bee7 100644 (file)
@@ -25134,13 +25134,9 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
     // we can split using the k-register rather than memory.
     if (SrcVT == MVT::v64i1 && DstVT == MVT::i64 && Subtarget.hasBWI()) {
       assert(!Subtarget.is64Bit() && "Expected 32-bit mode");
-      SDValue Lo = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v32i1,
-                               N->getOperand(0),
-                               DAG.getIntPtrConstant(0, dl));
+      SDValue Lo, Hi;
+      std::tie(Lo, Hi) = DAG.SplitVectorOperand(N, 0);
       Lo = DAG.getBitcast(MVT::i32, Lo);
-      SDValue Hi = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v32i1,
-                               N->getOperand(0),
-                               DAG.getIntPtrConstant(32, dl));
       Hi = DAG.getBitcast(MVT::i32, Hi);
       SDValue Res = DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, Lo, Hi);
       Results.push_back(Res);