[llvm] Port `NVPTXTargetLowering::LowerCONCAT_VECTORS` to SelectionDAG (PR #120030)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 23:03:18 PST 2024


================
@@ -1524,11 +1524,14 @@ SDValue SelectionDAGLegalize::ExpandConcatVectors(SDNode *Node) {
   SmallVector<SDValue, 16> Ops;
   unsigned NumOperands = Node->getNumOperands();
   MVT VectorIdxType = TLI.getVectorIdxTy(DAG.getDataLayout());
+  EVT VectorValueType = Node->getOperand(0).getValueType();
+  EVT ElementValueType = VectorValueType.getVectorElementType();
+  if (ElementValueType !=
+      TLI.getTypeToTransformTo(*DAG.getContext(), ElementValueType)) {
----------------
arsenm wrote:

I think checking whether the extract_vector_elt will be Expand would make more sense than checking the type's transformed type 

https://github.com/llvm/llvm-project/pull/120030


More information about the llvm-commits mailing list