44
55target triple = "aarch64-unknown-linux-gnu"
66
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.
811
912define 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
1014entry:
1115 %cmp4 = icmp sgt i32 %N , 0
1216 br i1 %cmp4 , label %for.body.preheader , label %for.cond.cleanup
@@ -33,6 +37,7 @@ for.body:
3337declare double @frexp (double , ptr ) #1
3438
3539define 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
3641entry:
3742 %cmp4 = icmp sgt i32 %N , 0
3843 br i1 %cmp4 , label %for.body.preheader , label %for.cond.cleanup
@@ -59,7 +64,7 @@ for.body:
5964declare float @frexpf (float , ptr ) #1
6065
6166define 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
6368entry:
6469 %cmp7 = icmp sgt i32 %N , 0
6570 br i1 %cmp7 , label %for.body.preheader , label %for.cond.cleanup
@@ -87,7 +92,7 @@ for.body:
8792declare double @modf (double , ptr ) #1
8893
8994define 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
9196entry:
9297 %cmp7 = icmp sgt i32 %N , 0
9398 br i1 %cmp7 , label %for.body.preheader , label %for.cond.cleanup
0 commit comments