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 i32 0, align 4
6 @b = global i32 0, align 4
7 @c = global i32 0, align 4
9 ; CHECK: ********** MI Scheduling **********
10 ; We need second, post-ra scheduling to have LDM instruction combined from single-loads
11 ; CHECK: ********** MI Scheduling **********
14 ; CHECK-NEXT: Latency : 4
17 ; CHECK-SAME: Latency=1
19 ; CHECK-SAME: Latency=3
21 ; CHECK-SAME: Latency=0
23 ; CHECK-SAME: Latency=0
24 define i32 @bar(i32 %a1, i32 %b1, i32 %c1) minsize optsize {
25 %1 = load i32, i32* @a, align 4
26 %2 = load i32, i32* @b, align 4
27 %3 = load i32, i32* @c, align 4
29 %ptr_after = getelementptr i32, i32* @a, i32 3
31 %ptr_val = ptrtoint i32* %ptr_after to i32
32 %mul1 = mul i32 %ptr_val, %1
33 %mul2 = mul i32 %mul1, %2
34 %mul3 = mul i32 %mul2, %3