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
32; 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-
53; 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-
74; 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-
95; 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-
116; 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-
137; 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-
158; 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-
179; 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
1810
19- ; REQUIRES: asserts
20-
2111target triple = "aarch64-unknown-linux-gnu"
2212
2313define void @frem_f64 (ptr noalias %in.ptr , ptr noalias %out.ptr ) {
2414; NEON-NO-VECLIB-LABEL: 'frem_f64'
2515; 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>
2717;
2818; SVE-NO-VECLIB-LABEL: 'frem_f64'
2919; 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>
3323;
3424; NEON-ARMPL-LABEL: 'frem_f64'
3525; 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>
3727;
3828; NEON-SLEEF-LABEL: 'frem_f64'
3929; 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>
4131;
4232; SVE-ARMPL-LABEL: 'frem_f64'
4333; 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>
4737;
4838; SVE-SLEEF-LABEL: 'frem_f64'
4939; 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>
5343;
5444; SVE-ARMPL-TAILFOLD-LABEL: 'frem_f64'
5545; 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>
5949;
6050; SVE-SLEEF-TAILFOLD-LABEL: 'frem_f64'
6151; 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>
6555;
6656 entry:
6757 br label %for.body
@@ -84,58 +74,58 @@ define void @frem_f64(ptr noalias %in.ptr, ptr noalias %out.ptr) {
8474define void @frem_f32 (ptr noalias %in.ptr , ptr noalias %out.ptr ) {
8575; NEON-NO-VECLIB-LABEL: 'frem_f32'
8676; 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>
8979;
9080; SVE-NO-VECLIB-LABEL: 'frem_f32'
9181; 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>
9787;
9888; NEON-ARMPL-LABEL: 'frem_f32'
9989; 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>
10292;
10393; NEON-SLEEF-LABEL: 'frem_f32'
10494; 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>
10797;
10898; SVE-ARMPL-LABEL: 'frem_f32'
10999; 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>
115105;
116106; SVE-SLEEF-LABEL: 'frem_f32'
117107; 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>
123113;
124114; SVE-ARMPL-TAILFOLD-LABEL: 'frem_f32'
125115; 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>
131121;
132122; SVE-SLEEF-TAILFOLD-LABEL: 'frem_f32'
133123; 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>
139129;
140130 entry:
141131 br label %for.body
0 commit comments