mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
329a30125b
The SchedModel allows the addition of ReadAdvances to express that certain operands of the instructions are needed at a later point than the others. RegAlloc may add pseudo operands that are not part of the instruction descriptor, and therefore cannot have any read advance entries. This meant that in some cases the desired read advance was nullified by such a pseudo operand, which still had the original latency. This patch fixes this by making sure that such pseudo operands get a zero latency during DAG construction. Review: Matthias Braun, Ulrich Weigand. https://reviews.llvm.org/D49671 llvm-svn: 345606
29 lines
892 B
LLVM
29 lines
892 B
LLVM
; REQUIRES: asserts
|
|
; 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
|
|
|
|
; CHECK: ********** MI Scheduling **********
|
|
; We need second, post-ra scheduling to have LDM instruction combined from single-loads
|
|
; CHECK: ********** MI Scheduling **********
|
|
; CHECK: LDMIA
|
|
; CHECK: rdefs left
|
|
; CHECK-NEXT: Latency : 3
|
|
; CHECK: Successors:
|
|
; CHECK: Data
|
|
; CHECK-SAME: Latency=3
|
|
; CHECK-NEXT: Data
|
|
; CHECK-SAME: Latency=0
|
|
|
|
define i32 @foo(i32* %a) nounwind optsize {
|
|
entry:
|
|
%b = getelementptr i32, i32* %a, i32 1
|
|
%c = getelementptr i32, i32* %a, i32 2
|
|
%0 = load i32, i32* %a, align 4
|
|
%1 = load i32, i32* %b, align 4
|
|
%2 = load i32, i32* %c, align 4
|
|
|
|
%mul1 = mul i32 %0, %1
|
|
%mul2 = mul i32 %mul1, %2
|
|
ret i32 %mul2
|
|
}
|
|
|