diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -3599,6 +3599,7 @@ case ISD::EXTRACT_SUBVECTOR: Res = WidenVecRes_EXTRACT_SUBVECTOR(N); break; case ISD::INSERT_VECTOR_ELT: Res = WidenVecRes_INSERT_VECTOR_ELT(N); break; case ISD::LOAD: Res = WidenVecRes_LOAD(N); break; + case ISD::STEP_VECTOR: case ISD::SPLAT_VECTOR: case ISD::SCALAR_TO_VECTOR: Res = WidenVecRes_ScalarOp(N); diff --git a/llvm/test/CodeGen/AArch64/sve-stepvector.ll b/llvm/test/CodeGen/AArch64/sve-stepvector.ll --- a/llvm/test/CodeGen/AArch64/sve-stepvector.ll +++ b/llvm/test/CodeGen/AArch64/sve-stepvector.ll @@ -45,6 +45,20 @@ ; ILLEGAL INTEGER TYPES +define @stepvector_nxv6i64() { +; CHECK-LABEL: stepvector_nxv6i64: +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: index z0.d, #0, #1 +; CHECK-NEXT: mov z1.d, z0.d +; CHECK-NEXT: mov z2.d, z0.d +; CHECK-NEXT: incd z1.d +; CHECK-NEXT: incd z2.d, all, mul #2 +; CHECK-NEXT: ret +entry: + %0 = call @llvm.experimental.stepvector.nxv6i64() + ret %0 +} + define @stepvector_nxv4i64() { ; CHECK-LABEL: stepvector_nxv4i64: ; CHECK: // %bb.0: // %entry @@ -73,6 +87,16 @@ ret %0 } +define @stepvector_nxv3i32() { +; CHECK-LABEL: stepvector_nxv3i32: +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: index z0.s, #0, #1 +; CHECK-NEXT: ret +entry: + %0 = call @llvm.experimental.stepvector.nxv3i32() + ret %0 +} + define @stepvector_nxv2i32() { ; CHECK-LABEL: stepvector_nxv2i32: ; CHECK: // %bb.0: // %entry @@ -422,8 +446,10 @@ declare @llvm.experimental.stepvector.nxv8i16() declare @llvm.experimental.stepvector.nxv16i8() +declare @llvm.experimental.stepvector.nxv6i64() declare @llvm.experimental.stepvector.nxv4i64() declare @llvm.experimental.stepvector.nxv16i32() +declare @llvm.experimental.stepvector.nxv3i32() declare @llvm.experimental.stepvector.nxv2i32() declare @llvm.experimental.stepvector.nxv8i8() declare @llvm.experimental.stepvector.nxv4i16()