[llvm] r284835 - [X86] Use DAG::getBuildVector helper wrapper where possible. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 09:07:52 PDT 2016


Author: rksimon
Date: Fri Oct 21 11:07:51 2016
New Revision: 284835

URL: http://llvm.org/viewvc/llvm-project?rev=284835&view=rev
Log:
[X86] Use DAG::getBuildVector helper wrapper where possible. NFCI.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=284835&r1=284834&r2=284835&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Oct 21 11:07:51 2016
@@ -4463,8 +4463,8 @@ static SDValue extractSubVector(SDValue
 
   // If the input is a buildvector just emit a smaller one.
   if (Vec.getOpcode() == ISD::BUILD_VECTOR)
-    return DAG.getNode(ISD::BUILD_VECTOR,
-         dl, ResultVT, makeArrayRef(Vec->op_begin() + IdxVal, ElemsPerChunk));
+    return DAG.getNode(ISD::BUILD_VECTOR, dl, ResultVT,
+                       makeArrayRef(Vec->op_begin() + IdxVal, ElemsPerChunk));
 
   SDValue VecIdx = DAG.getIntPtrConstant(IdxVal, dl);
   return DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, ResultVT, Vec, VecIdx);
@@ -19419,7 +19419,7 @@ static SDValue LowerVectorCTLZInRegLUT(S
   SmallVector<SDValue, 64> LUTVec;
   for (int i = 0; i < NumBytes; ++i)
     LUTVec.push_back(DAG.getConstant(LUT[i % 16], DL, MVT::i8));
-  SDValue InRegLUT = DAG.getNode(ISD::BUILD_VECTOR, DL, CurrVT, LUTVec);
+  SDValue InRegLUT = DAG.getBuildVector(CurrVT, DL, LUTVec);
 
   // Begin by bitcasting the input to byte vector, then split those bytes
   // into lo/hi nibbles and use the PSHUFB LUT to perform CLTZ on each of them.
@@ -31779,7 +31779,7 @@ static SDValue combineVZext(SDNode *N, S
       Cst = Cst.zextOrTrunc(SVT.getSizeInBits());
       Vals.push_back(DAG.getConstant(Cst, DL, SVT));
     }
-    return DAG.getNode(ISD::BUILD_VECTOR, DL, VT, Vals);
+    return DAG.getBuildVector(VT, DL, Vals);
   }
 
   // (vzext (bitcast (vzext (x)) -> (vzext x)




More information about the llvm-commits mailing list