[llvm-dev] Followup loop attribute

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Followup loop attribute

Shoaib Meenai via llvm-dev

Hello,

 

I hit a problem which seems related to followup loop attribute.

The testcase is like:

 

for (…) {

  #pragma clang loop vectorize(enable) unroll_count(4)

  for (…) {

  }

}

 

Before loop vectorization, the Metadata is like:

!7 = distinct !{!7, !8}     <== LOOP

!8 = distinct !{!8, !9, !10}

!9 = !{!"llvm.loop.isvectorized"}

!10 = !{!"llvm.loop.unroll.count", i32 4}

!11 = distinct !{!11, !12, !13}    <== LOOP

!12 = !{!"llvm.loop.vectorize.enable", i1 true}

!13 = !{!"llvm.loop.vectorize.followup_all", !8}

 

After loop vectorization, the Metadata is:

!7 = distinct !{!7, !8}

!8 = distinct !{!8, !9, !10}

!9 = !{!"llvm.loop.isvectorized"}

!10 = !{!"llvm.loop.unroll.count", i32 4}

!11 = distinct !{!11, !8, !12}

!12 = !{!"llvm.loop.isvectorized", i32 1}

 

During loop unrolling, the compiler cannot find the “llvm.loop.unroll.count” pragama value (either from !7 or !11) since the value is one level down. Is there any existing solution for this or it is a known issue?

 

 

 

Thanks,

Yan

 


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev