1 ; RUN: llc < %s -mtriple=arm64-eabi -enable-misched=false -verify-machineinstrs | FileCheck %s
3 ; The next set of tests makes sure we can combine the second instruction into
6 ; CHECK-LABEL: ldp_int_aa
7 ; CHECK: ldp w8, w9, [x1]
8 ; CHECK: str w0, [x1, #8]
10 define i32 @ldp_int_aa(i32 %a, ptr %p) nounwind {
11 %tmp = load i32, ptr %p, align 4
12 %str.ptr = getelementptr inbounds i32, ptr %p, i64 2
13 store i32 %a, ptr %str.ptr, align 4
14 %add.ptr = getelementptr inbounds i32, ptr %p, i64 1
15 %tmp1 = load i32, ptr %add.ptr, align 4
16 %add = add nsw i32 %tmp1, %tmp
20 ; CHECK-LABEL: ldp_long_aa
21 ; CHECK: ldp x8, x9, [x1]
22 ; CHECK: str x0, [x1, #16]
24 define i64 @ldp_long_aa(i64 %a, ptr %p) nounwind {
25 %tmp = load i64, ptr %p, align 8
26 %str.ptr = getelementptr inbounds i64, ptr %p, i64 2
27 store i64 %a, ptr %str.ptr, align 4
28 %add.ptr = getelementptr inbounds i64, ptr %p, i64 1
29 %tmp1 = load i64, ptr %add.ptr, align 8
30 %add = add nsw i64 %tmp1, %tmp
34 ; CHECK-LABEL: ldp_float_aa
35 ; CHECK: str s0, [x0, #8]
36 ; CHECK: ldp s1, s0, [x0]
38 define float @ldp_float_aa(float %a, ptr %p) nounwind {
39 %tmp = load float, ptr %p, align 4
40 %str.ptr = getelementptr inbounds float, ptr %p, i64 2
41 store float %a, ptr %str.ptr, align 4
42 %add.ptr = getelementptr inbounds float, ptr %p, i64 1
43 %tmp1 = load float, ptr %add.ptr, align 4
44 %add = fadd float %tmp, %tmp1
48 ; CHECK-LABEL: ldp_double_aa
49 ; CHECK: str d0, [x0, #16]
50 ; CHECK: ldp d1, d0, [x0]
52 define double @ldp_double_aa(double %a, ptr %p) nounwind {
53 %tmp = load double, ptr %p, align 8
54 %str.ptr = getelementptr inbounds double, ptr %p, i64 2
55 store double %a, ptr %str.ptr, align 4
56 %add.ptr = getelementptr inbounds double, ptr %p, i64 1
57 %tmp1 = load double, ptr %add.ptr, align 8
58 %add = fadd double %tmp, %tmp1