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
|
|
|
; N=3 STMIA_UPD should have latency 2cyc and writeback latency 1cyc
|
|
|
|
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
|
|
; We need second, post-ra scheduling to have STM instruction combined from single-stores
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
|
|
; CHECK: schedule starting
|
|
|
|
; CHECK: STMIA_UPD
|
|
|
|
; CHECK: rdefs left
|
|
|
|
; CHECK-NEXT: Latency : 2
|
|
|
|
; CHECK: Successors
|
2017-07-12 23:30:59 +08:00
|
|
|
; CHECK: Data
|
2017-06-02 16:53:19 +08:00
|
|
|
; CHECK-SAME: Latency=1
|
|
|
|
|
|
|
|
define i32 @bar(i32 %v0, i32 %v1, i32 %v2, i32* %addr) {
|
|
|
|
|
|
|
|
%addr.1 = getelementptr i32, i32* %addr, i32 0
|
|
|
|
store i32 %v0, i32* %addr.1
|
|
|
|
|
|
|
|
%addr.2 = getelementptr i32, i32* %addr, i32 1
|
|
|
|
store i32 %v1, i32* %addr.2
|
|
|
|
|
|
|
|
%addr.3 = getelementptr i32, i32* %addr, i32 2
|
|
|
|
store i32 %v2, i32* %addr.3
|
|
|
|
|
|
|
|
%ptr_after = getelementptr i32, i32* %addr, i32 3
|
|
|
|
%val = ptrtoint i32* %ptr_after to i32
|
|
|
|
|
|
|
|
%rv1 = mul i32 %val, %v0
|
|
|
|
%rv2 = mul i32 %rv1, %v1
|
|
|
|
%rv3 = mul i32 %rv2, %v2
|
|
|
|
|
|
|
|
ret i32 %rv3
|
|
|
|
}
|
|
|
|
|