1 // RUN: fir-opt --cfg-conversion %s | FileCheck %s
3 #access_group = #llvm.access_group<id = distinct[0]<>>
4 // CHECK: #[[ACCESS:.*]] = #llvm.access_group<id = distinct[0]<>>
5 #loop_vectorize = #llvm.loop_vectorize<disable = false>
6 // CHECK: #[[VECTORIZE:.*]] = #llvm.loop_vectorize<disable = false>
7 #loop_annotation = #llvm.loop_annotation<vectorize = #loop_vectorize, parallelAccesses = #access_group>
8 // CHECK: #[[ANNOTATION:.*]] = #llvm.loop_annotation<vectorize = #[[VECTORIZE]], parallelAccesses = #[[ACCESS]]>
10 // CHECK-LABEL: @_QPvector_always
11 func.func @_QPvector_always() -> i32 {
12 %c1 = arith.constant 1 : index
13 %c10_i32 = arith.constant 10 : i32
14 %c1_i32 = arith.constant 1 : i32
15 %c10 = arith.constant 10 : index
16 // CHECK: cf.cond_br %{{.*}}, ^{{.*}}, ^{{.*}} {loop_annotation = #[[ANNOTATION]]}
17 %8:2 = fir.do_loop %arg0 = %c1 to %c10 step %c1 iter_args(%arg1 = %c1_i32) -> (index, i32) attributes {loopAnnotation = #loop_annotation} {
18 fir.result %c1, %c1_i32 : index, i32