Skip to content

Commit 3abf8eb

Browse files
committed
[slp][tests] Add missing function attributes
SLP is currently assuming that control dependence in these cases is irrelevant. This is only valid if none of the lib-funcs involved can throw or infinite loop in the scalar forms. This appears to be true (or at least we infer the respective attributes) for the libfuncs I spot checked. This change is mostly for shrunking the diff on an upcoming patch.
1 parent b4d08df commit 3abf8eb

File tree

6 files changed

+68
-68
lines changed

6 files changed

+68
-68
lines changed

llvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions-inseltpoison.ll

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ entry:
5050
ret <4 x float> %vecins.3
5151
}
5252

53-
declare float @ceilf(float) readonly
53+
declare float @ceilf(float) readonly nounwind willreturn
5454

5555
define <4 x float> @ceil_4x(<4 x float>* %a) {
5656
; CHECK-LABEL: @ceil_4x(
@@ -82,7 +82,7 @@ entry:
8282
ret <4 x float> %vecins.3
8383
}
8484

85-
declare float @fabsf(float) readonly
85+
declare float @fabsf(float) readonly nounwind willreturn
8686

8787
define <4 x float> @fabs_4x(<4 x float>* %a) {
8888
; CHECK-LABEL: @fabs_4x(
@@ -113,7 +113,7 @@ entry:
113113
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
114114
ret <4 x float> %vecins.3
115115
}
116-
declare float @llvm.fabs.f32(float)
116+
declare float @llvm.fabs.f32(float) nounwind willreturn
117117
define <4 x float> @int_fabs_4x(<4 x float>* %a) {
118118
; CHECK-LABEL: @int_fabs_4x(
119119
; CHECK-NEXT: entry:
@@ -143,7 +143,7 @@ entry:
143143
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
144144
ret <4 x float> %vecins.3
145145
}
146-
declare float @floorf(float) readonly
146+
declare float @floorf(float) readonly nounwind willreturn
147147
define <4 x float> @floor_4x(<4 x float>* %a) {
148148
; CHECK-LABEL: @floor_4x(
149149
; CHECK-NEXT: entry:
@@ -173,7 +173,7 @@ entry:
173173
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
174174
ret <4 x float> %vecins.3
175175
}
176-
declare float @sqrtf(float) readonly
176+
declare float @sqrtf(float) readonly nounwind willreturn
177177
define <4 x float> @sqrt_4x(<4 x float>* %a) {
178178
; CHECK-LABEL: @sqrt_4x(
179179
; CHECK-NEXT: entry:
@@ -203,7 +203,7 @@ entry:
203203
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
204204
ret <4 x float> %vecins.3
205205
}
206-
declare float @expf(float) readonly
206+
declare float @expf(float) readonly nounwind willreturn
207207
define <4 x float> @exp_4x(<4 x float>* %a) {
208208
; CHECK-LABEL: @exp_4x(
209209
; CHECK-NEXT: entry:
@@ -245,7 +245,7 @@ entry:
245245
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
246246
ret <4 x float> %vecins.3
247247
}
248-
declare float @expm1f(float) readonly
248+
declare float @expm1f(float) readonly nounwind willreturn
249249
define <4 x float> @expm1_4x(<4 x float>* %a) {
250250
; CHECK-LABEL: @expm1_4x(
251251
; CHECK-NEXT: entry:
@@ -286,7 +286,7 @@ entry:
286286
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
287287
ret <4 x float> %vecins.3
288288
}
289-
declare float @logf(float) readonly
289+
declare float @logf(float) readonly nounwind willreturn
290290
define <4 x float> @log_4x(<4 x float>* %a) {
291291
; CHECK-LABEL: @log_4x(
292292
; CHECK-NEXT: entry:
@@ -328,7 +328,7 @@ entry:
328328
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
329329
ret <4 x float> %vecins.3
330330
}
331-
declare float @log1pf(float) readonly
331+
declare float @log1pf(float) readonly nounwind willreturn
332332
define <4 x float> @log1p_4x(<4 x float>* %a) {
333333
; CHECK-LABEL: @log1p_4x(
334334
; CHECK-NEXT: entry:
@@ -369,7 +369,7 @@ entry:
369369
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
370370
ret <4 x float> %vecins.3
371371
}
372-
declare float @log10pf(float) readonly
372+
declare float @log10pf(float) readonly nounwind willreturn
373373
define <4 x float> @log10p_4x(<4 x float>* %a) {
374374
; CHECK-LABEL: @log10p_4x(
375375
; CHECK-NEXT: entry:
@@ -421,7 +421,7 @@ entry:
421421
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
422422
ret <4 x float> %vecins.3
423423
}
424-
declare float @logbf(float) readonly
424+
declare float @logbf(float) readonly nounwind willreturn
425425
define <4 x float> @logb_4x(<4 x float>* %a) {
426426
; CHECK-LABEL: @logb_4x(
427427
; CHECK-NEXT: entry:
@@ -462,7 +462,7 @@ entry:
462462
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
463463
ret <4 x float> %vecins.3
464464
}
465-
declare float @sinf(float) readonly
465+
declare float @sinf(float) readonly nounwind willreturn
466466
define <4 x float> @sin_4x(<4 x float>* %a) {
467467
; CHECK-LABEL: @sin_4x(
468468
; CHECK-NEXT: entry:
@@ -504,7 +504,7 @@ entry:
504504
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
505505
ret <4 x float> %vecins.3
506506
}
507-
declare float @cosf(float) readonly
507+
declare float @cosf(float) readonly nounwind willreturn
508508
define <4 x float> @cos_4x(<4 x float>* %a) {
509509
; CHECK-LABEL: @cos_4x(
510510
; CHECK-NEXT: entry:
@@ -546,7 +546,7 @@ entry:
546546
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
547547
ret <4 x float> %vecins.3
548548
}
549-
declare float @tanf(float) readonly
549+
declare float @tanf(float) readonly nounwind willreturn
550550
define <4 x float> @tan_4x(<4 x float>* %a) {
551551
; CHECK-LABEL: @tan_4x(
552552
; CHECK-NEXT: entry:
@@ -587,7 +587,7 @@ entry:
587587
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
588588
ret <4 x float> %vecins.3
589589
}
590-
declare float @asinf(float) readonly
590+
declare float @asinf(float) readonly nounwind willreturn
591591
define <4 x float> @asin_4x(<4 x float>* %a) {
592592
; CHECK-LABEL: @asin_4x(
593593
; CHECK-NEXT: entry:
@@ -628,7 +628,7 @@ entry:
628628
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
629629
ret <4 x float> %vecins.3
630630
}
631-
declare float @acosf(float) readonly
631+
declare float @acosf(float) readonly nounwind willreturn
632632
define <4 x float> @acos_4x(<4 x float>* %a) {
633633
; CHECK-LABEL: @acos_4x(
634634
; CHECK-NEXT: entry:
@@ -669,7 +669,7 @@ entry:
669669
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
670670
ret <4 x float> %vecins.3
671671
}
672-
declare float @atanf(float) readonly
672+
declare float @atanf(float) readonly nounwind willreturn
673673
define <4 x float> @atan_4x(<4 x float>* %a) {
674674
; CHECK-LABEL: @atan_4x(
675675
; CHECK-NEXT: entry:
@@ -710,7 +710,7 @@ entry:
710710
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
711711
ret <4 x float> %vecins.3
712712
}
713-
declare float @sinhf(float) readonly
713+
declare float @sinhf(float) readonly nounwind willreturn
714714
define <4 x float> @sinh_4x(<4 x float>* %a) {
715715
; CHECK-LABEL: @sinh_4x(
716716
; CHECK-NEXT: entry:
@@ -751,7 +751,7 @@ entry:
751751
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
752752
ret <4 x float> %vecins.3
753753
}
754-
declare float @coshf(float) readonly
754+
declare float @coshf(float) readonly nounwind willreturn
755755
define <4 x float> @cosh_4x(<4 x float>* %a) {
756756
; CHECK-LABEL: @cosh_4x(
757757
; CHECK-NEXT: entry:
@@ -792,7 +792,7 @@ entry:
792792
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
793793
ret <4 x float> %vecins.3
794794
}
795-
declare float @tanhf(float) readonly
795+
declare float @tanhf(float) readonly nounwind willreturn
796796
define <4 x float> @tanh_4x(<4 x float>* %a) {
797797
; CHECK-LABEL: @tanh_4x(
798798
; CHECK-NEXT: entry:
@@ -833,7 +833,7 @@ entry:
833833
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
834834
ret <4 x float> %vecins.3
835835
}
836-
declare float @asinhf(float) readonly
836+
declare float @asinhf(float) readonly nounwind willreturn
837837
define <4 x float> @asinh_4x(<4 x float>* %a) {
838838
; CHECK-LABEL: @asinh_4x(
839839
; CHECK-NEXT: entry:
@@ -874,7 +874,7 @@ entry:
874874
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
875875
ret <4 x float> %vecins.3
876876
}
877-
declare float @acoshf(float) readonly
877+
declare float @acoshf(float) readonly nounwind willreturn
878878
define <4 x float> @acosh_4x(<4 x float>* %a) {
879879
; CHECK-LABEL: @acosh_4x(
880880
; CHECK-NEXT: entry:
@@ -915,7 +915,7 @@ entry:
915915
%vecins.3 = insertelement <4 x float> %vecins.2, float %4, i32 3
916916
ret <4 x float> %vecins.3
917917
}
918-
declare float @atanhf(float) readonly
918+
declare float @atanhf(float) readonly nounwind willreturn
919919
define <4 x float> @atanh_4x(<4 x float>* %a) {
920920
; CHECK-LABEL: @atanh_4x(
921921
; CHECK-NEXT: entry:

0 commit comments

Comments
 (0)