2017-06-02 10:53:19 +02:00
|
|
|
; REQUIRES: asserts
|
2019-11-05 10:10:58 +01:00
|
|
|
; RUN: llc < %s -mtriple=armv8r-eabi -mcpu=cortex-a57 -mattr=use-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s
|
2017-06-02 10:53:19 +02:00
|
|
|
;
|
|
|
|
|
2020-12-31 00:23:20 +01:00
|
|
|
@a = dso_local global i32 0, align 4
|
|
|
|
@b = dso_local global i32 0, align 4
|
|
|
|
@c = dso_local global i32 0, align 4
|
2017-06-02 10:53:19 +02:00
|
|
|
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
|
|
; We need second, post-ra scheduling to have LDM instruction combined from single-loads
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
|
|
; CHECK: LDMIA_UPD
|
|
|
|
; CHECK: rdefs left
|
|
|
|
; CHECK-NEXT: Latency : 4
|
|
|
|
; CHECK: Successors:
|
2017-07-12 17:30:59 +02:00
|
|
|
; CHECK: Data
|
2017-06-02 10:53:19 +02:00
|
|
|
; CHECK-SAME: Latency=1
|
2017-07-12 17:30:59 +02:00
|
|
|
; CHECK-NEXT: Data
|
2017-06-02 10:53:19 +02:00
|
|
|
; CHECK-SAME: Latency=3
|
2017-07-12 17:30:59 +02:00
|
|
|
; CHECK-NEXT: Data
|
2018-10-30 16:04:40 +01:00
|
|
|
; CHECK-SAME: Latency=0
|
2017-07-12 17:30:59 +02:00
|
|
|
; CHECK-NEXT: Data
|
2018-10-30 16:04:40 +01:00
|
|
|
; CHECK-SAME: Latency=0
|
2020-12-31 00:23:20 +01:00
|
|
|
define dso_local i32 @bar(i32 %a1, i32 %b1, i32 %c1) minsize optsize {
|
2017-06-02 10:53:19 +02:00
|
|
|
%1 = load i32, i32* @a, align 4
|
|
|
|
%2 = load i32, i32* @b, align 4
|
|
|
|
%3 = load i32, i32* @c, align 4
|
|
|
|
|
|
|
|
%ptr_after = getelementptr i32, i32* @a, i32 3
|
|
|
|
|
|
|
|
%ptr_val = ptrtoint i32* %ptr_after to i32
|
|
|
|
%mul1 = mul i32 %ptr_val, %1
|
|
|
|
%mul2 = mul i32 %mul1, %2
|
|
|
|
%mul3 = mul i32 %mul2, %3
|
|
|
|
ret i32 %mul3
|
|
|
|
}
|
|
|
|
|