1
1
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2
- ; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16 -mattr=+sve | FileCheck %s
2
+ ; RUN: opt < %s -enable-no-nans-fp-math -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16 -mattr=+sve | FileCheck %s
3
3
4
4
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5
5
6
6
define void @fadd () {
7
7
; CHECK-LABEL: 'fadd'
8
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V4F16 = fadd <vscale x 4 x half> undef, undef
9
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V8F16 = fadd <vscale x 8 x half> undef, undef
10
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V16F16 = fadd <vscale x 16 x half> undef, undef
11
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V1F32 = fadd <vscale x 1 x float> undef, undef
12
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F32 = fadd <vscale x 2 x float> undef, undef
13
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V4F32 = fadd <vscale x 4 x float> undef, undef
14
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V8F32 = fadd <vscale x 8 x float> undef, undef
15
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F64 = fadd <vscale x 2 x double> undef, undef
16
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F64 = fadd <vscale x 4 x double> undef, undef
17
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction : ret void
8
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V4F16 = fadd <vscale x 4 x half> undef, undef
9
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V8F16 = fadd <vscale x 8 x half> undef, undef
10
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V16F16 = fadd <vscale x 16 x half> undef, undef
11
+ ; CHECK-NEXT: Cost Model: Found costs of Invalid for : %V1F32 = fadd <vscale x 1 x float> undef, undef
12
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F32 = fadd <vscale x 2 x float> undef, undef
13
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V4F32 = fadd <vscale x 4 x float> undef, undef
14
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V8F32 = fadd <vscale x 8 x float> undef, undef
15
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F64 = fadd <vscale x 2 x double> undef, undef
16
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V4F64 = fadd <vscale x 4 x double> undef, undef
17
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for : ret void
18
18
;
19
19
%V4F16 = fadd <vscale x 4 x half > undef , undef
20
20
%V8F16 = fadd <vscale x 8 x half > undef , undef
@@ -33,16 +33,16 @@ define void @fadd() {
33
33
34
34
define void @fsub () {
35
35
; CHECK-LABEL: 'fsub'
36
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V4F16 = fsub <vscale x 4 x half> undef, undef
37
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V8F16 = fsub <vscale x 8 x half> undef, undef
38
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V16F16 = fsub <vscale x 16 x half> undef, undef
39
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V1F32 = fsub <vscale x 1 x float> undef, undef
40
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F32 = fsub <vscale x 2 x float> undef, undef
41
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V4F32 = fsub <vscale x 4 x float> undef, undef
42
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V8F32 = fsub <vscale x 8 x float> undef, undef
43
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F64 = fsub <vscale x 2 x double> undef, undef
44
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F64 = fsub <vscale x 4 x double> undef, undef
45
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction : ret void
36
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V4F16 = fsub <vscale x 4 x half> undef, undef
37
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V8F16 = fsub <vscale x 8 x half> undef, undef
38
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V16F16 = fsub <vscale x 16 x half> undef, undef
39
+ ; CHECK-NEXT: Cost Model: Found costs of Invalid for : %V1F32 = fsub <vscale x 1 x float> undef, undef
40
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F32 = fsub <vscale x 2 x float> undef, undef
41
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V4F32 = fsub <vscale x 4 x float> undef, undef
42
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V8F32 = fsub <vscale x 8 x float> undef, undef
43
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F64 = fsub <vscale x 2 x double> undef, undef
44
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V4F64 = fsub <vscale x 4 x double> undef, undef
45
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for : ret void
46
46
;
47
47
%V4F16 = fsub <vscale x 4 x half > undef , undef
48
48
%V8F16 = fsub <vscale x 8 x half > undef , undef
@@ -61,16 +61,16 @@ define void @fsub() {
61
61
62
62
define void @fneg () {
63
63
; CHECK-LABEL: 'fneg'
64
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F16 = fneg <vscale x 2 x half> undef
65
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V4F16 = fneg <vscale x 4 x half> undef
66
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V8F16 = fneg <vscale x 8 x half> undef
67
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V16F16 = fneg <vscale x 16 x half> undef
68
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F32 = fneg <vscale x 2 x float> undef
69
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V4F32 = fneg <vscale x 4 x float> undef
70
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V8F32 = fneg <vscale x 8 x float> undef
71
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction : %V2F64 = fneg <vscale x 2 x double> undef
72
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F64 = fneg <vscale x 4 x double> undef
73
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction : ret void
64
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F16 = fneg <vscale x 2 x half> undef
65
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V4F16 = fneg <vscale x 4 x half> undef
66
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V8F16 = fneg <vscale x 8 x half> undef
67
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V16F16 = fneg <vscale x 16 x half> undef
68
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F32 = fneg <vscale x 2 x float> undef
69
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V4F32 = fneg <vscale x 4 x float> undef
70
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V8F32 = fneg <vscale x 8 x float> undef
71
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat: 1 for: %V2F64 = fneg <vscale x 2 x double> undef
72
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V4F64 = fneg <vscale x 4 x double> undef
73
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for : ret void
74
74
;
75
75
%V2F16 = fneg <vscale x 2 x half > undef
76
76
%V4F16 = fneg <vscale x 4 x half > undef
@@ -89,15 +89,15 @@ define void @fneg() {
89
89
90
90
define void @fmul () {
91
91
; CHECK-LABEL: 'fmul'
92
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F16 = fmul <vscale x 4 x half> undef, undef
93
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V8F16 = fmul <vscale x 8 x half> undef, undef
94
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction : %V16F16 = fmul <vscale x 16 x half> undef, undef
95
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V2F32 = fmul <vscale x 2 x float> undef, undef
96
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F32 = fmul <vscale x 4 x float> undef, undef
97
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction : %V8F32 = fmul <vscale x 8 x float> undef, undef
98
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V2F64 = fmul <vscale x 2 x double> undef, undef
99
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction : %V4F64 = fmul <vscale x 4 x double> undef, undef
100
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction : ret void
92
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V4F16 = fmul <vscale x 4 x half> undef, undef
93
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V8F16 = fmul <vscale x 8 x half> undef, undef
94
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:3 SizeLat:1 for : %V16F16 = fmul <vscale x 16 x half> undef, undef
95
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V2F32 = fmul <vscale x 2 x float> undef, undef
96
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V4F32 = fmul <vscale x 4 x float> undef, undef
97
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:3 SizeLat:1 for : %V8F32 = fmul <vscale x 8 x float> undef, undef
98
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for : %V2F64 = fmul <vscale x 2 x double> undef, undef
99
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:3 SizeLat:1 for : %V4F64 = fmul <vscale x 4 x double> undef, undef
100
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for : ret void
101
101
;
102
102
%V4F16 = fmul <vscale x 4 x half > undef , undef
103
103
%V8F16 = fmul <vscale x 8 x half > undef , undef
@@ -115,15 +115,15 @@ define void @fmul() {
115
115
116
116
define void @fdiv () {
117
117
; CHECK-LABEL: 'fdiv'
118
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F16 = fdiv <vscale x 4 x half> undef, undef
119
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V8F16 = fdiv <vscale x 8 x half> undef, undef
120
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction : %V16F16 = fdiv <vscale x 16 x half> undef, undef
121
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V2F32 = fdiv <vscale x 2 x float> undef, undef
122
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V4F32 = fdiv <vscale x 4 x float> undef, undef
123
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction : %V8F32 = fdiv <vscale x 8 x float> undef, undef
124
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction : %V2F64 = fdiv <vscale x 2 x double> undef, undef
125
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction : %V4F64 = fdiv <vscale x 4 x double> undef, undef
126
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction : ret void
118
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:4 for : %V4F16 = fdiv <vscale x 4 x half> undef, undef
119
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:4 for : %V8F16 = fdiv <vscale x 8 x half> undef, undef
120
+ ; CHECK-NEXT: Cost Model: Found costs of 4 for: %V16F16 = fdiv <vscale x 16 x half> undef, undef
121
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:4 for : %V2F32 = fdiv <vscale x 2 x float> undef, undef
122
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:4 for : %V4F32 = fdiv <vscale x 4 x float> undef, undef
123
+ ; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = fdiv <vscale x 8 x float> undef, undef
124
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:4 for : %V2F64 = fdiv <vscale x 2 x double> undef, undef
125
+ ; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = fdiv <vscale x 4 x double> undef, undef
126
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for : ret void
127
127
;
128
128
%V4F16 = fdiv <vscale x 4 x half > undef , undef
129
129
%V8F16 = fdiv <vscale x 8 x half > undef , undef
@@ -141,15 +141,15 @@ define void @fdiv() {
141
141
142
142
define void @frem () {
143
143
; CHECK-LABEL: 'frem'
144
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V4F16 = frem <vscale x 4 x half> undef, undef
145
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V8F16 = frem <vscale x 8 x half> undef, undef
146
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V16F16 = frem <vscale x 16 x half> undef, undef
147
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V2F32 = frem <vscale x 2 x float> undef, undef
148
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V4F32 = frem <vscale x 4 x float> undef, undef
149
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V8F32 = frem <vscale x 8 x float> undef, undef
150
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V2F64 = frem <vscale x 2 x double> undef, undef
151
- ; CHECK-NEXT: Cost Model: Invalid cost for instruction : %V4F64 = frem <vscale x 4 x double> undef, undef
152
- ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction : ret void
144
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V4F16 = frem <vscale x 4 x half> undef, undef
145
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V8F16 = frem <vscale x 8 x half> undef, undef
146
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V16F16 = frem <vscale x 16 x half> undef, undef
147
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V2F32 = frem <vscale x 2 x float> undef, undef
148
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V4F32 = frem <vscale x 4 x float> undef, undef
149
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V8F32 = frem <vscale x 8 x float> undef, undef
150
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V2F64 = frem <vscale x 2 x double> undef, undef
151
+ ; CHECK-NEXT: Cost Model: Found costs of RThru: Invalid CodeSize:4 Lat:4 SizeLat:4 for : %V4F64 = frem <vscale x 4 x double> undef, undef
152
+ ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for : ret void
153
153
;
154
154
%V4F16 = frem <vscale x 4 x half > undef , undef
155
155
%V8F16 = frem <vscale x 8 x half > undef , undef
0 commit comments