[AArch64 NEON] Fix a pattern match failure with NEON_VDUP.
[oota-llvm.git] / lib / Target / AArch64 / AArch64ISelLowering.cpp
index 1b75d0571aeaa2cc9a4072552ec20761faa0c580..f72dfe46de70039881024b5e601e080c892c9c45 100644 (file)
@@ -4070,9 +4070,7 @@ AArch64TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
   if (ValueCounts.size() == 0)
     return DAG.getUNDEF(VT);
 
-  // Loads are better lowered with insert_vector_elt.
-  // Keep going if we are hitting this case.
-  if (isOnlyLowElement && !ISD::isNormalLoad(Value.getNode()))
+  if (isOnlyLowElement)
     return DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, VT, Value);
 
   unsigned EltSize = VT.getVectorElementType().getSizeInBits();