2 ; RUN: llc < %s -mtriple=armv8r-eabi -mcpu=cortex-a57 -misched-postra -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s
5 @a = global double 0.0, align 4
6 @b = global double 0.0, align 4
7 @c = global double 0.0, align 4
9 ; CHECK: ********** MI Scheduling **********
10 ; We need second, post-ra scheduling to have VLDM instruction combined from single-loads
11 ; CHECK: ********** MI Scheduling **********
14 ; CHECK-NEXT: Latency : 6
17 ; CHECK-SAME: Latency=1
19 ; CHECK-SAME: Latency=1
21 ; CHECK-SAME: Latency=5
23 ; CHECK-SAME: Latency=0
25 ; CHECK-SAME: Latency=0
26 define i32 @bar(i32* %iptr) minsize optsize {
27 %1 = load double, double* @a, align 8
28 %2 = load double, double* @b, align 8
29 %3 = load double, double* @c, align 8
31 %ptr_after = getelementptr double, double* @a, i32 3
33 %ptr_new_ival = ptrtoint double* %ptr_after to i32
34 %ptr_new = inttoptr i32 %ptr_new_ival to i32*
36 store i32 %ptr_new_ival, i32* %iptr, align 8
38 %v1 = fptoui double %1 to i32
40 %mul1 = mul i32 %ptr_new_ival, %v1
42 %v2 = fptoui double %2 to i32
43 %v3 = fptoui double %3 to i32
45 %mul2 = mul i32 %mul1, %v2
46 %mul3 = mul i32 %mul2, %v3