1
- ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "estimated cost.*frem" --version 4
2
-
1
+ ; REQUIRES: asserts
3
2
; RUN: opt -mattr=+neon -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=NEON-NO-VECLIB
4
-
5
3
; RUN: opt -mattr=+sve -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=SVE-NO-VECLIB
6
-
7
4
; RUN: opt -mattr=+neon -vector-library=ArmPL -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=NEON-ARMPL
8
-
9
5
; RUN: opt -mattr=+neon -vector-library=sleefgnuabi -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=NEON-SLEEF
10
-
11
6
; RUN: opt -mattr=+sve -vector-library=ArmPL -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=SVE-ARMPL
12
-
13
7
; RUN: opt -mattr=+sve -vector-library=sleefgnuabi -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=SVE-SLEEF
14
-
15
8
; RUN: opt -mattr=+sve -vector-library=ArmPL -passes=loop-vectorize -prefer-predicate-over-epilogue=predicate-dont-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=SVE-ARMPL-TAILFOLD
16
-
17
9
; RUN: opt -mattr=+sve -vector-library=sleefgnuabi -passes=loop-vectorize -prefer-predicate-over-epilogue=predicate-dont-vectorize -debug-only=loop-vectorize -disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=SVE-SLEEF-TAILFOLD
18
10
19
- ; REQUIRES: asserts
20
-
21
11
target triple = "aarch64-unknown-linux-gnu"
22
12
23
13
define void @frem_f64 (ptr noalias %in.ptr , ptr noalias %out.ptr ) {
24
14
; NEON-NO-VECLIB-LABEL: 'frem_f64'
25
15
; NEON-NO-VECLIB: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
26
- ; NEON-NO-VECLIB: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem double %in, %in
16
+ ; NEON-NO-VECLIB: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
27
17
;
28
18
; SVE-NO-VECLIB-LABEL: 'frem_f64'
29
19
; SVE-NO-VECLIB: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
30
- ; SVE-NO-VECLIB: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem double %in, %in
31
- ; SVE-NO-VECLIB: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem double %in, %in
32
- ; SVE-NO-VECLIB: LV: Found an estimated cost of Invalid for VF vscale x 2 For instruction: %res = frem double %in, %in
20
+ ; SVE-NO-VECLIB: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
21
+ ; SVE-NO-VECLIB: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
22
+ ; SVE-NO-VECLIB: Cost of Invalid for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
33
23
;
34
24
; NEON-ARMPL-LABEL: 'frem_f64'
35
25
; NEON-ARMPL: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
36
- ; NEON-ARMPL: LV: Found an estimated cost of 10 for VF 2 For instruction: %res = frem double %in, %in
26
+ ; NEON-ARMPL: Cost of 10 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
37
27
;
38
28
; NEON-SLEEF-LABEL: 'frem_f64'
39
29
; NEON-SLEEF: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
40
- ; NEON-SLEEF: LV: Found an estimated cost of 10 for VF 2 For instruction: %res = frem double %in, %in
30
+ ; NEON-SLEEF: Cost of 10 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
41
31
;
42
32
; SVE-ARMPL-LABEL: 'frem_f64'
43
33
; SVE-ARMPL: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
44
- ; SVE-ARMPL: LV: Found an estimated cost of 10 for VF 2 For instruction: %res = frem double %in, %in
45
- ; SVE-ARMPL: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem double %in, %in
46
- ; SVE-ARMPL: LV: Found an estimated cost of 10 for VF vscale x 2 For instruction: %res = frem double %in, %in
34
+ ; SVE-ARMPL: Cost of 10 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
35
+ ; SVE-ARMPL: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
36
+ ; SVE-ARMPL: Cost of 10 for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
47
37
;
48
38
; SVE-SLEEF-LABEL: 'frem_f64'
49
39
; SVE-SLEEF: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
50
- ; SVE-SLEEF: LV: Found an estimated cost of 10 for VF 2 For instruction: %res = frem double %in, %in
51
- ; SVE-SLEEF: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem double %in, %in
52
- ; SVE-SLEEF: LV: Found an estimated cost of 10 for VF vscale x 2 For instruction: %res = frem double %in, %in
40
+ ; SVE-SLEEF: Cost of 10 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
41
+ ; SVE-SLEEF: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
42
+ ; SVE-SLEEF: Cost of 10 for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
53
43
;
54
44
; SVE-ARMPL-TAILFOLD-LABEL: 'frem_f64'
55
45
; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
56
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 10 for VF 2 For instruction: %res = frem double %in, %in
57
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem double %in, %in
58
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 10 for VF vscale x 2 For instruction: %res = frem double %in, %in
46
+ ; SVE-ARMPL-TAILFOLD: Cost of 10 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
47
+ ; SVE-ARMPL-TAILFOLD: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
48
+ ; SVE-ARMPL-TAILFOLD: Cost of 10 for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
59
49
;
60
50
; SVE-SLEEF-TAILFOLD-LABEL: 'frem_f64'
61
51
; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem double %in, %in
62
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 10 for VF 2 For instruction: %res = frem double %in, %in
63
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem double %in, %in
64
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 10 for VF vscale x 2 For instruction: %res = frem double %in, %in
52
+ ; SVE-SLEEF-TAILFOLD: Cost of 10 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
53
+ ; SVE-SLEEF-TAILFOLD: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
54
+ ; SVE-SLEEF-TAILFOLD: Cost of 10 for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
65
55
;
66
56
entry:
67
57
br label %for.body
@@ -84,58 +74,58 @@ define void @frem_f64(ptr noalias %in.ptr, ptr noalias %out.ptr) {
84
74
define void @frem_f32 (ptr noalias %in.ptr , ptr noalias %out.ptr ) {
85
75
; NEON-NO-VECLIB-LABEL: 'frem_f32'
86
76
; NEON-NO-VECLIB: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
87
- ; NEON-NO-VECLIB: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
88
- ; NEON-NO-VECLIB: LV: Found an estimated cost of 52 for VF 4 For instruction: %res = frem float %in, %in
77
+ ; NEON-NO-VECLIB: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
78
+ ; NEON-NO-VECLIB: Cost of 52 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
89
79
;
90
80
; SVE-NO-VECLIB-LABEL: 'frem_f32'
91
81
; SVE-NO-VECLIB: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
92
- ; SVE-NO-VECLIB: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
93
- ; SVE-NO-VECLIB: LV: Found an estimated cost of 52 for VF 4 For instruction: %res = frem float %in, %in
94
- ; SVE-NO-VECLIB: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem float %in, %in
95
- ; SVE-NO-VECLIB: LV: Found an estimated cost of Invalid for VF vscale x 2 For instruction: %res = frem float %in, %in
96
- ; SVE-NO-VECLIB: LV: Found an estimated cost of Invalid for VF vscale x 4 For instruction: %res = frem float %in, %in
82
+ ; SVE-NO-VECLIB: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
83
+ ; SVE-NO-VECLIB: Cost of 52 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
84
+ ; SVE-NO-VECLIB: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
85
+ ; SVE-NO-VECLIB: Cost of Invalid for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
86
+ ; SVE-NO-VECLIB: Cost of Invalid for VF vscale x 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
97
87
;
98
88
; NEON-ARMPL-LABEL: 'frem_f32'
99
89
; NEON-ARMPL: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
100
- ; NEON-ARMPL: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
101
- ; NEON-ARMPL: LV: Found an estimated cost of 10 for VF 4 For instruction: %res = frem float %in, %in
90
+ ; NEON-ARMPL: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
91
+ ; NEON-ARMPL: Cost of 10 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
102
92
;
103
93
; NEON-SLEEF-LABEL: 'frem_f32'
104
94
; NEON-SLEEF: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
105
- ; NEON-SLEEF: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
106
- ; NEON-SLEEF: LV: Found an estimated cost of 10 for VF 4 For instruction: %res = frem float %in, %in
95
+ ; NEON-SLEEF: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
96
+ ; NEON-SLEEF: Cost of 10 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
107
97
;
108
98
; SVE-ARMPL-LABEL: 'frem_f32'
109
99
; SVE-ARMPL: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
110
- ; SVE-ARMPL: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
111
- ; SVE-ARMPL: LV: Found an estimated cost of 10 for VF 4 For instruction: %res = frem float %in, %in
112
- ; SVE-ARMPL: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem float %in, %in
113
- ; SVE-ARMPL: LV: Found an estimated cost of Invalid for VF vscale x 2 For instruction: %res = frem float %in, %in
114
- ; SVE-ARMPL: LV: Found an estimated cost of 10 for VF vscale x 4 For instruction: %res = frem float %in, %in
100
+ ; SVE-ARMPL: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
101
+ ; SVE-ARMPL: Cost of 10 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
102
+ ; SVE-ARMPL: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
103
+ ; SVE-ARMPL: Cost of Invalid for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
104
+ ; SVE-ARMPL: Cost of 10 for VF vscale x 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
115
105
;
116
106
; SVE-SLEEF-LABEL: 'frem_f32'
117
107
; SVE-SLEEF: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
118
- ; SVE-SLEEF: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
119
- ; SVE-SLEEF: LV: Found an estimated cost of 10 for VF 4 For instruction: %res = frem float %in, %in
120
- ; SVE-SLEEF: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem float %in, %in
121
- ; SVE-SLEEF: LV: Found an estimated cost of Invalid for VF vscale x 2 For instruction: %res = frem float %in, %in
122
- ; SVE-SLEEF: LV: Found an estimated cost of 10 for VF vscale x 4 For instruction: %res = frem float %in, %in
108
+ ; SVE-SLEEF: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
109
+ ; SVE-SLEEF: Cost of 10 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
110
+ ; SVE-SLEEF: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
111
+ ; SVE-SLEEF: Cost of Invalid for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
112
+ ; SVE-SLEEF: Cost of 10 for VF vscale x 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
123
113
;
124
114
; SVE-ARMPL-TAILFOLD-LABEL: 'frem_f32'
125
115
; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
126
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
127
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 10 for VF 4 For instruction: %res = frem float %in, %in
128
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem float %in, %in
129
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of Invalid for VF vscale x 2 For instruction: %res = frem float %in, %in
130
- ; SVE-ARMPL-TAILFOLD: LV: Found an estimated cost of 10 for VF vscale x 4 For instruction: %res = frem float %in, %in
116
+ ; SVE-ARMPL-TAILFOLD: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
117
+ ; SVE-ARMPL-TAILFOLD: Cost of 10 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
118
+ ; SVE-ARMPL-TAILFOLD: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
119
+ ; SVE-ARMPL-TAILFOLD: Cost of Invalid for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
120
+ ; SVE-ARMPL-TAILFOLD: Cost of 10 for VF vscale x 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
131
121
;
132
122
; SVE-SLEEF-TAILFOLD-LABEL: 'frem_f32'
133
123
; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 10 for VF 1 For instruction: %res = frem float %in, %in
134
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 24 for VF 2 For instruction: %res = frem float %in, %in
135
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 10 for VF 4 For instruction: %res = frem float %in, %in
136
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of Invalid for VF vscale x 1 For instruction: %res = frem float %in, %in
137
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of Invalid for VF vscale x 2 For instruction: %res = frem float %in, %in
138
- ; SVE-SLEEF-TAILFOLD: LV: Found an estimated cost of 10 for VF vscale x 4 For instruction: %res = frem float %in, %in
124
+ ; SVE-SLEEF-TAILFOLD: Cost of 24 for VF 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
125
+ ; SVE-SLEEF-TAILFOLD: Cost of 10 for VF 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
126
+ ; SVE-SLEEF-TAILFOLD: Cost of Invalid for VF vscale x 1: WIDEN ir< %res> = frem ir< %in>, ir< %in>
127
+ ; SVE-SLEEF-TAILFOLD: Cost of Invalid for VF vscale x 2: WIDEN ir< %res> = frem ir< %in>, ir< %in>
128
+ ; SVE-SLEEF-TAILFOLD: Cost of 10 for VF vscale x 4: WIDEN ir< %res> = frem ir< %in>, ir< %in>
139
129
;
140
130
entry:
141
131
br label %for.body
0 commit comments