brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 7f609f9 Raw
57 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output -polly-invariant-load-hoisting < %s 2>&1 | FileCheck %s2 3; Verify that we canonicalize accesses even tough one of the accesses (even4; the canonical base) has a partial execution context. This is correct as5; the combined execution context still covers both accesses.6 7; CHECK:      Invariant Accesses: {8; CHECK-NEXT:         ReadAccess :=	[Reduction Type: NONE] [Scalar: 0]9; CHECK-NEXT:             { Stmt_body2[i0] -> MemRef_A[0] };10; CHECK-NEXT:         Execution Context: {  :  }11; CHECK-NEXT: }12 13; CHECK:      Stmt_body114; CHECK-NEXT:   Domain :=15; CHECK-NEXT:       { Stmt_body1[i0] : 0 <= i0 <= 1022 };16; CHECK-NEXT:   Schedule :=17; CHECK-NEXT:       { Stmt_body1[i0] -> [i0, 0] };18; CHECK-NEXT:   MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]19; CHECK-NEXT:       { Stmt_body1[i0] -> MemRef_baseB[0] };20; CHECK-NEXT: Stmt_body221; CHECK-NEXT:   Domain :=22; CHECK-NEXT:       { Stmt_body2[i0] : 0 <= i0 <= 510 };23; CHECK-NEXT:   Schedule :=24; CHECK-NEXT:       { Stmt_body2[i0] -> [i0, 1] };25; CHECK-NEXT:   MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]26; CHECK-NEXT:       { Stmt_body2[i0] -> MemRef_baseB[0] };27 28 29define void @foo(ptr %A) {30start:31  br label %loop32 33loop:34  %indvar = phi i64 [0, %start], [%indvar.next, %latch]35  %indvar.next = add nsw i64 %indvar, 136  %icmp = icmp slt i64 %indvar.next, 102437  br i1 %icmp, label %body1, label %exit38 39body1:40  %baseA = load ptr, ptr %A41  store float 42.0, ptr %baseA42  %cmp = icmp slt i64 %indvar.next, 51243  br i1 %cmp, label %body2, label %latch44 45body2:46  %baseB = load ptr, ptr %A47  store float 42.0, ptr %baseB48  br label %latch49 50latch:51  br label %loop52 53exit:54  ret void55 56}57