1; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mcpu=cortex-a57 -mattr=+neon -fp-contract=fast -regalloc=pbqp -pbqp-coalescing | FileCheck %s
2
3%pl = type { i32, i32, i32, i32, %p*, %l*, double* }
4%p = type { i32, %ca*, [27 x %ca*], %v*, %v*, %v*, i32 }
5%ca = type { %v, float, i32 }
6%v = type { double, double, double }
7%l = type opaque
8%rs = type { i32, i32, i32, i32, %v*, %v*, [21 x double], %v, %v, %v, double, double, double }
9
10;CHECK-LABEL: test_csr
11define void @test_csr(%pl* nocapture readnone %this, %rs* nocapture %r) align 2 {
12;CHECK-NOT: stp {{d[0-9]+}}, {{d[0-9]+}}
13entry:
14  %x.i = getelementptr inbounds %rs, %rs* %r, i64 0, i32 7, i32 0
15  %y.i = getelementptr inbounds %rs, %rs* %r, i64 0, i32 7, i32 1
16  %z.i = getelementptr inbounds %rs, %rs* %r, i64 0, i32 7, i32 2
17  %x.i61 = getelementptr inbounds %rs, %rs* %r, i64 0, i32 8, i32 0
18  %y.i62 = getelementptr inbounds %rs, %rs* %r, i64 0, i32 8, i32 1
19  %z.i63 = getelementptr inbounds %rs, %rs* %r, i64 0, i32 8, i32 2
20  %x.i58 = getelementptr inbounds %rs, %rs* %r, i64 0, i32 9, i32 0
21  %y.i59 = getelementptr inbounds %rs, %rs* %r, i64 0, i32 9, i32 1
22  %z.i60 = getelementptr inbounds %rs, %rs* %r, i64 0, i32 9, i32 2
23  %na = getelementptr inbounds %rs, %rs* %r, i64 0, i32 0
24  %0 = bitcast double* %x.i to i8*
25  call void @llvm.memset.p0i8.i64(i8* align 8 %0, i8 0, i64 72, i1 false)
26  %1 = load i32, i32* %na, align 4
27  %cmp70 = icmp sgt i32 %1, 0
28  br i1 %cmp70, label %for.body.lr.ph, label %for.end
29
30for.body.lr.ph:                                   ; preds = %entry
31  %fn = getelementptr inbounds %rs, %rs* %r, i64 0, i32 4
32  %2 = load %v*, %v** %fn, align 8
33  %fs = getelementptr inbounds %rs, %rs* %r, i64 0, i32 5
34  %3 = load %v*, %v** %fs, align 8
35  %4 = sext i32 %1 to i64
36  br label %for.body
37
38for.body:                                         ; preds = %for.body.lr.ph, %for.body
39  %5 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add6.i, %for.body ]
40  %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ]
41  %6 = phi <2 x double> [ zeroinitializer, %for.body.lr.ph ], [ %17, %for.body ]
42  %7 = phi <2 x double> [ zeroinitializer, %for.body.lr.ph ], [ %22, %for.body ]
43  %8 = phi <2 x double> [ zeroinitializer, %for.body.lr.ph ], [ %26, %for.body ]
44  %9 = phi <2 x double> [ zeroinitializer, %for.body.lr.ph ], [ %28, %for.body ]
45  %x.i54 = getelementptr inbounds %v, %v* %2, i64 %indvars.iv, i32 0
46  %x1.i = getelementptr inbounds %v, %v* %3, i64 %indvars.iv, i32 0
47  %y.i56 = getelementptr inbounds %v, %v* %2, i64 %indvars.iv, i32 1
48  %10 = bitcast double* %x.i54 to <2 x double>*
49  %11 = load <2 x double>, <2 x double>* %10, align 8
50  %y2.i = getelementptr inbounds %v, %v* %3, i64 %indvars.iv, i32 1
51  %12 = bitcast double* %x1.i to <2 x double>*
52  %13 = load <2 x double>, <2 x double>* %12, align 8
53  %14 = fadd fast <2 x double> %13, %11
54  %z.i57 = getelementptr inbounds %v, %v* %2, i64 %indvars.iv, i32 2
55  %15 = load double, double* %z.i57, align 8
56  %z4.i = getelementptr inbounds %v, %v* %3, i64 %indvars.iv, i32 2
57  %16 = load double, double* %z4.i, align 8
58  %add5.i = fadd fast double %16, %15
59  %17 = fadd fast <2 x double> %6, %11
60  %18 = bitcast double* %x.i to <2 x double>*
61  store <2 x double> %17, <2 x double>* %18, align 8
62  %19 = load double, double* %x1.i, align 8
63  %20 = insertelement <2 x double> undef, double %15, i32 0
64  %21 = insertelement <2 x double> %20, double %19, i32 1
65  %22 = fadd fast <2 x double> %7, %21
66  %23 = bitcast double* %z.i to <2 x double>*
67  store <2 x double> %22, <2 x double>* %23, align 8
68  %24 = bitcast double* %y2.i to <2 x double>*
69  %25 = load <2 x double>, <2 x double>* %24, align 8
70  %26 = fadd fast <2 x double> %8, %25
71  %27 = bitcast double* %y.i62 to <2 x double>*
72  store <2 x double> %26, <2 x double>* %27, align 8
73  %28 = fadd fast <2 x double> %14, %9
74  %29 = bitcast double* %x.i58 to <2 x double>*
75  store <2 x double> %28, <2 x double>* %29, align 8
76  %add6.i = fadd fast double %add5.i, %5
77  store double %add6.i, double* %z.i60, align 8
78  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
79  %cmp = icmp slt i64 %indvars.iv.next, %4
80  br i1 %cmp, label %for.body, label %for.end.loopexit
81
82for.end.loopexit:                                 ; preds = %for.body
83  br label %for.end
84
85for.end:                                          ; preds = %for.end.loopexit, %entry
86  ret void
87}
88
89; Function Attrs: nounwind
90declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1)
91
92