; RUN: opt %s -basicaa -scoped-noalias -polly-scops -polly-invariant-load-hoisting -analyze 2>&1| FileCheck %s ;CHECK: Function: test_init_chpl ;CHECK-NEXT: Region: %bb1---%bb16 ;CHECK-NEXT: Max Loop Depth: 2 ;CHECK-NEXT: Invariant Accesses: { ;CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ;CHECK-NEXT: [p_0] -> { Stmt1[i0, i1] -> MemRef0[1] }; ;CHECK-NEXT: Execution Context: [p_0] -> { : } ;CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ;CHECK-NEXT: [p_0] -> { Stmt1[i0, i1] -> MemRef1[9] }; ;CHECK-NEXT: Execution Context: [p_0] -> { : } ;CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] ;CHECK-NEXT: [p_0] -> { Stmt1[i0, i1] -> MemRef1[2] }; ;CHECK-NEXT: Execution Context: [p_0] -> { : } ;CHECK-NEXT: } ; ModuleID = 'zeeshan.ll' source_filename = "root" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" %array_ty = type { i64, %array_ptr*, i8 } %array_ptr = type { [2 x i64], [2 x i64], [2 x i64], i64, i64, double*, double*, i8 } ; Function Attrs: noinline define weak dso_local void @test_init_chpl(%array_ty* noalias nonnull %arg, double** nonnull %dummy3, double** nonnull %dummy5, double** nonnull %dummy9) { bb: br label %bb1 bb1: ; preds = %bb14, %bb %.0 = phi i64 [ 1, %bb ], [ %tmp15, %bb14 ] ;%load3 = load double*, double** %dummy3, align 8, !alias.scope !13, !noalias !23 %load5 = load double*, double** %dummy3, align 8, !alias.scope !15, !noalias !25 %load9 = load double*, double** %dummy5, align 8, !alias.scope !19, !noalias !29 br label %bb2_0 bb2_5: %tmp13 = add nuw nsw i64 %.01, 1 %exitcond = icmp ne i64 %tmp13, 1001 br i1 %exitcond, label %bb2_0, label %bb14 bb2_4: %tmp10 = getelementptr inbounds double, double* %tmp9, i64 %tmp7 store double 13.0, double* %tmp10, align 8, !alias.scope !19, !noalias !29 br label %bb2_5 bb2_3: %tmp6 = mul nsw i64 %tmp5, %.0 %tmp7 = add nsw i64 %tmp6, %.01 %tmp8 = getelementptr inbounds %array_ptr, %array_ptr* %tmp3, i64 0, i32 6 %tmp9 = load double*, double** %tmp8, align 8, !alias.scope !19, !noalias !29 br label %bb2_4 bb2_2: %tmp4 = getelementptr inbounds %array_ptr, %array_ptr* %tmp3, i64 0, i32 1, i64 0 %tmp5 = load i64, i64* %tmp4, align 8, !alias.scope !15, !noalias !25 br label %bb2_3 bb2_1: %tmp = getelementptr inbounds %array_ty, %array_ty* %arg, i64 0, i32 1 %tmp3 = load %array_ptr*, %array_ptr** %tmp, align 8, !alias.scope !13, !noalias !23 br label %bb2_2 bb2_0: %.01 = phi i64 [ 1, %bb1 ], [ %tmp13, %bb2_5 ] br label %bb2_1 bb14: ; preds = %bb2 %tmp15 = add nuw nsw i64 %.0, 1 %exitcond8 = icmp ne i64 %tmp15, 1001 br i1 %exitcond8, label %bb1, label %bb16 bb16: ; preds = %bb14 ret void } ; Alias domains !0 = !{!0, !"alias domain"} ; Alias scopes !3 = !{!3, !0, !"alias scope for %tmp3"} !5 = !{!5, !0, !"alias scope for %tmp5"} !9 = !{!9, !0, !"alias scope for %tmp9"} ; Lists only containing the alias scope !13 = !{!3} !15 = !{!5} !19 = !{!9} ; List containing all alias scopes except one !23 = !{!5, !9} !25 = !{!3, !9} !29 = !{!3, !5}