1 ; RUN: opt %loadNPMPolly '-passes=print<polly-optree>' -disable-output < %s | FileCheck %s -match-full-lines
3 ; Move instructions from region statements.
5 ; for (int j = 0; j < n; j += 1) {
7 ; double val = 21.0 + 21.0;
17 define void @func(i32 %n, ptr noalias nonnull %A) {
22 %j = phi i32 [0, %entry], [%j.inc, %inc]
23 %j.cmp = icmp slt i32 %j, %n
24 br i1 %j.cmp, label %bodyA, label %exit
27 %val = fadd double 21.0, 21.0
28 %cond = fcmp oeq double 21.0, 21.0
29 br i1 %cond, label %bodyA_true, label %bodyB
32 store double 42.0, ptr %A
36 store double %val, ptr %A
43 %j.inc = add nuw nsw i32 %j, 1
54 ; CHECK: Instructions copied: 1
55 ; CHECK: Known loads forwarded: 0
56 ; CHECK: Read-only accesses copied: 0
57 ; CHECK: Operand trees forwarded: 1
58 ; CHECK: Statements with forwarded operand trees: 1
60 ; CHECK: After statements {
61 ; CHECK: Stmt_bodyA__TO__bodyB
62 ; CHECK: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0]
63 ; CHECK: [n] -> { Stmt_bodyA__TO__bodyB[i0] -> MemRef_A[0] };
64 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
65 ; CHECK: [n] -> { Stmt_bodyA__TO__bodyB[i0] -> MemRef_val[] };
66 ; CHECK: Instructions {
67 ; CHECK: %val = fadd double 2.100000e+01, 2.100000e+01
68 ; CHECK: %cond = fcmp oeq double 2.100000e+01, 2.100000e+01
71 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
72 ; CHECK: [n] -> { Stmt_bodyB[i0] -> MemRef_A[0] };
73 ; CHECK: Instructions {
74 ; CHECK: %val = fadd double 2.100000e+01, 2.100000e+01
75 ; CHECK: store double %val, ptr %A, align 8