2017-06-02 16:53:19 +08:00
|
|
|
; REQUIRES: asserts
|
2019-11-05 17:10:58 +08: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 16:53:19 +08:00
|
|
|
;
|
|
|
|
|
|
|
|
@a = global double 0.0, align 4
|
|
|
|
@b = global double 0.0, align 4
|
|
|
|
@c = global double 0.0, align 4
|
|
|
|
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
|
|
; We need second, post-ra scheduling to have VLDM instruction combined from single-loads
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
|
|
; CHECK: VLDMDIA_UPD
|
|
|
|
; CHECK: rdefs left
|
|
|
|
; CHECK-NEXT: Latency : 6
|
|
|
|
; CHECK: Successors:
|
2017-07-12 23:30:59 +08:00
|
|
|
; CHECK: Data
|
2017-06-02 16:53:19 +08:00
|
|
|
; CHECK-SAME: Latency=1
|
2017-07-12 23:30:59 +08:00
|
|
|
; CHECK-NEXT: Data
|
2017-06-02 16:53:19 +08:00
|
|
|
; CHECK-SAME: Latency=1
|
2017-07-12 23:30:59 +08:00
|
|
|
; CHECK-NEXT: Data
|
2017-06-02 16:53:19 +08:00
|
|
|
; CHECK-SAME: Latency=5
|
2017-07-12 23:30:59 +08:00
|
|
|
; CHECK-NEXT: Data
|
2018-10-30 23:04:40 +08:00
|
|
|
; CHECK-SAME: Latency=0
|
2017-07-12 23:30:59 +08:00
|
|
|
; CHECK-NEXT: Data
|
2018-10-30 23:04:40 +08:00
|
|
|
; CHECK-SAME: Latency=0
|
2017-06-02 16:53:19 +08:00
|
|
|
define i32 @bar(i32* %iptr) minsize optsize {
|
|
|
|
%1 = load double, double* @a, align 8
|
|
|
|
%2 = load double, double* @b, align 8
|
|
|
|
%3 = load double, double* @c, align 8
|
|
|
|
|
|
|
|
%ptr_after = getelementptr double, double* @a, i32 3
|
|
|
|
|
|
|
|
%ptr_new_ival = ptrtoint double* %ptr_after to i32
|
|
|
|
%ptr_new = inttoptr i32 %ptr_new_ival to i32*
|
|
|
|
|
|
|
|
store i32 %ptr_new_ival, i32* %iptr, align 8
|
|
|
|
|
|
|
|
%v1 = fptoui double %1 to i32
|
|
|
|
|
|
|
|
%mul1 = mul i32 %ptr_new_ival, %v1
|
|
|
|
|
|
|
|
%v2 = fptoui double %2 to i32
|
|
|
|
%v3 = fptoui double %3 to i32
|
|
|
|
|
|
|
|
%mul2 = mul i32 %mul1, %v2
|
|
|
|
%mul3 = mul i32 %mul2, %v3
|
|
|
|
|
|
|
|
ret i32 %mul3
|
|
|
|
}
|
|
|
|
|