1 ; RUN: opt %loadPolly -polly-invariant-load-hoisting=true -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines
4 define void @foo(ptr %A, i32 %p, ptr %B) {
9 %cmp = icmp eq i32 %p, 1024
10 br i1 %cmp, label %next, label %end
13 %val = load float, ptr %A
14 %fcmp = fcmp oeq float %val, 41.0
18 br i1 %fcmp, label %a, label %b
21 store float %val, ptr %A
25 store float 1.0, ptr %A
32 ; CHECK: After statements {
33 ; CHECK-NEXT: Stmt_next
34 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
35 ; CHECK-NEXT: [p] -> { Stmt_next[] -> MemRef_A[0] };
36 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
37 ; CHECK-NEXT: [p] -> { Stmt_next[] -> MemRef_fcmp[] };
38 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
39 ; CHECK-NEXT: [p] -> { Stmt_next[] -> MemRef_val[] };
40 ; CHECK-NEXT: Instructions {
41 ; CHECK-NEXT: %val = load float, ptr %A, align 4
42 ; CHECK-NEXT: %fcmp = fcmp oeq float %val, 4.100000e+01
44 ; CHECK-NEXT: Stmt_nonaffine__TO__end
45 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
47 ; CHECK-NEXT: new: [p] -> { Stmt_nonaffine__TO__end[] -> MemRef_A[0] };
48 ; CHECK-NEXT: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0]
49 ; CHECK-NEXT: [p] -> { Stmt_nonaffine__TO__end[] -> MemRef_A[0] };
50 ; CHECK-NEXT: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0]
51 ; CHECK-NEXT: [p] -> { Stmt_nonaffine__TO__end[] -> MemRef_A[0] };
52 ; CHECK-NEXT: Instructions {
53 ; CHECK-NEXT: %val = load float, ptr %A, align 4
54 ; CHECK-NEXT: %val = load float, ptr %A, align 4
55 ; CHECK-NEXT: %fcmp = fcmp oeq float %val, 4.100000e+01