1 ; RUN: opt -S -passes=loop-vectorize < %s | FileCheck %s
3 target triple = "aarch64-unknown-linux-gnu"
5 define void @widen_extractvalue(ptr %dst, {i64, i64} %sv) #0 {
6 ; CHECK-LABEL: @widen_extractvalue(
7 ; CHECK: [[EXTRACT0:%.*]] = extractvalue { i64, i64 } [[SV:%.*]], 0
8 ; CHECK-NEXT: [[EXTRACT1:%.*]] = extractvalue { i64, i64 } [[SV]], 1
9 ; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[EXTRACT0]], i64 0
10 ; CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
11 ; CHECK-NEXT: [[DOTSPLATINSERT1:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[EXTRACT1]], i64 0
12 ; CHECK-NEXT: [[DOTSPLAT2:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT1]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
13 ; CHECK: [[ADD:%.*]] = add <vscale x 2 x i64> [[DOTSPLAT]], [[DOTSPLAT2]]
19 %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop.body ]
20 %a = extractvalue { i64, i64 } %sv, 0
21 %b = extractvalue { i64, i64 } %sv, 1
22 %addr = getelementptr i64, ptr %dst, i32 %iv
24 store i64 %add, ptr %addr
25 %iv.next = add nsw i32 %iv, 1
26 %cond = icmp ne i32 %iv.next, 0
27 br i1 %cond, label %loop.body, label %exit, !llvm.loop !0
33 attributes #0 = { "target-features"="+sve" }
35 !0 = distinct !{!0, !1, !2, !3, !4, !5}
36 !1 = !{!"llvm.loop.mustprogress"}
37 !2 = !{!"llvm.loop.vectorize.width", i32 2}
38 !3 = !{!"llvm.loop.vectorize.scalable.enable", i1 true}
39 !4 = !{!"llvm.loop.interleave.count", i32 1}
40 !5 = !{!"llvm.loop.vectorize.enable", i1 true}