1 ; RUN: opt -passes='print<loops>' -disable-output %s 2>&1 | FileCheck %s
3 ; void func(long n, double A[static const restrict n]) {
4 ; for (long i = 0; i < n; i += 1)
8 ; Check that isAnnotatedParallel is working as expected.
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 define void @func(i64 %n, ptr noalias nonnull %A) {
17 %i.0 = phi i64 [ 0, %entry ], [ %add, %for.body ]
18 %cmp = icmp slt i64 %i.0, %n
19 br i1 %cmp, label %for.body, label %for.end
22 %arrayidx = getelementptr inbounds double, ptr %A, i64 %i.0
23 store double 2.100000e+01, ptr %arrayidx, align 8, !llvm.access.group !6
24 %add = add nuw nsw i64 %i.0, 1
25 br label %for.cond, !llvm.loop !7
31 !6 = distinct !{} ; access group
33 !7 = distinct !{!7, !9} ; LoopID
34 !9 = !{!"llvm.loop.parallel_accesses", !6}
36 ; CHECK: Loop info for function 'func':
37 ; CHECK: Parallel Loop at depth 1 containing: