misched-fp-basic.ll
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
; REQUIRES: asserts
; RUN: llc < %s -mtriple=arm-eabi -mcpu=cortex-a9 -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > \
; RUN: /dev/null | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK_A9
; RUN: llc < %s -mtriple=arm-eabi -mcpu=swift -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > \
; RUN: /dev/null | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK_SWIFT
; RUN: llc < %s -mtriple=arm-eabi -mcpu=cortex-r52 -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > \
; RUN: /dev/null | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK_R52
;
; Check the latency of instructions for processors with sched-models
;
; Function Attrs: norecurse nounwind readnone
define i32 @foo(float %a, float %b, float %c, i32 %d) local_unnamed_addr #0 {
entry:
;
; CHECK: ********** MI Scheduling **********
; CHECK_A9: VADDS
; CHECK_SWIFT: VADDfd
; CHECK_R52: VADDS
; CHECK_A9: Latency : 5
; CHECK_SWIFT: Latency : 4
; CHECK_R52: Latency : 6
;
; CHECK_A9: VMULS
; CHECK_SWIFT: VMULfd
; CHECK_R52: VMULS
; CHECK_SWIFT: Latency : 4
; CHECK_A9: Latency : 6
; CHECK_R52: Latency : 6
;
; CHECK: VDIVS
; CHECK_SWIFT: Latency : 17
; CHECK_A9: Latency : 16
; CHECK_R52: Latency : 7
;
; CHECK: VCVTDS
; CHECK_SWIFT: Latency : 4
; CHECK_A9: Latency : 5
; CHECK_R52: Latency : 6
;
; CHECK: VADDD
; CHECK_SWIFT: Latency : 6
; CHECK_A9: Latency : 5
; CHECK_R52: Latency : 6
;
; CHECK: VMULD
; CHECK_SWIFT: Latency : 6
; CHECK_A9: Latency : 7
; CHECK_R52: Latency : 6
;
; CHECK: VDIVD
; CHECK_SWIFT: Latency : 32
; CHECK_A9: Latency : 26
; CHECK_R52: Latency : 17
;
; CHECK: VTOSIZD
; CHECK_SWIFT: Latency : 4
; CHECK_A9: Latency : 5
; CHECK_R52: Latency : 6
;
%add = fadd float %a, %b
%mul = fmul float %add, %add
%div = fdiv float %mul, %b
%conv1 = fpext float %div to double
%add3 = fadd double %conv1, %conv1
%mul4 = fmul double %add3, %add3
%div5 = fdiv double %mul4, %conv1
%conv6 = fptosi double %div5 to i32
ret i32 %conv6
}