4
4
5
5
target triple = "aarch64-unknown-linux-gnu"
6
6
7
- ; TODO: add mappings for frexp/frexpf
7
+ ; LoopVectorizer's Legality does not let vectorization to happen because there
8
+ ; is no scalar to vector mapping in TLI for frexp/frexpf. As a result, LAA will
9
+ ; never encounter such loops.
10
+ ; Tests will need to be changed when such mappings are added.
8
11
9
12
define void @frexp_f64 (ptr %in , ptr %out1 , ptr %out2 , i32 %N ) {
13
+ ; CHECK-NOT: LAA: Allow to vectorize math function with write-only attribute: %call = tail call double @frexp
10
14
entry:
11
15
%cmp4 = icmp sgt i32 %N , 0
12
16
br i1 %cmp4 , label %for.body.preheader , label %for.cond.cleanup
@@ -33,6 +37,7 @@ for.body:
33
37
declare double @frexp (double , ptr ) #1
34
38
35
39
define void @frexp_f32 (ptr readonly %in , ptr %out1 , ptr %out2 , i32 %N ) {
40
+ ; CHECK-NOT: LAA: Allow to vectorize math function with write-only attribute: %call = tail call float @frexpf
36
41
entry:
37
42
%cmp4 = icmp sgt i32 %N , 0
38
43
br i1 %cmp4 , label %for.body.preheader , label %for.cond.cleanup
@@ -59,7 +64,7 @@ for.body:
59
64
declare float @frexpf (float , ptr ) #1
60
65
61
66
define void @modf_f64 (ptr %in , ptr %out1 , ptr %out2 , i32 %N ) {
62
- ; CHECK: LAA: allow math function with write-only attribute: %call = tail call double @modf
67
+ ; CHECK: LAA: Allow to vectorize math function with write-only attribute: %call = tail call double @modf
63
68
entry:
64
69
%cmp7 = icmp sgt i32 %N , 0
65
70
br i1 %cmp7 , label %for.body.preheader , label %for.cond.cleanup
@@ -87,7 +92,7 @@ for.body:
87
92
declare double @modf (double , ptr ) #1
88
93
89
94
define void @modf_f32 (ptr %in , ptr %out1 , ptr %out2 , i32 %N ) {
90
- ; CHECK: LAA: allow math function with write-only attribute: %call = tail call float @modff
95
+ ; CHECK: LAA: Allow to vectorize math function with write-only attribute: %call = tail call float @modff
91
96
entry:
92
97
%cmp7 = icmp sgt i32 %N , 0
93
98
br i1 %cmp7 , label %for.body.preheader , label %for.cond.cleanup
0 commit comments