1 ; RUN: opt %loadPolly -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines
3 ; Move instructions to region statements.
5 ; for (int j = 0; j < n; j += 1) {
7 ; double val = 21.0 + 21.0;
15 define void @func(i32 %n, ptr noalias nonnull %A) {
20 %j = phi i32 [0, %entry], [%j.inc, %inc]
21 %j.cmp = icmp slt i32 %j, %n
22 br i1 %j.cmp, label %bodyA, label %exit
25 %val = fadd double 21.0, 21.0
29 %cond = fcmp oeq double 21.0, 21.0
30 br i1 %cond, label %bodyB_true, label %bodyB_exit
33 store double %val, ptr %A
40 %j.inc = add nuw nsw i32 %j, 1
51 ; CHECK: Instructions copied: 1
52 ; CHECK: Known loads forwarded: 0
53 ; CHECK: Read-only accesses copied: 0
54 ; CHECK: Operand trees forwarded: 1
55 ; CHECK: Statements with forwarded operand trees: 1
58 ; CHECK: After statements {
59 ; CHECK-NEXT: Stmt_bodyA
60 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
61 ; CHECK-NEXT: [n] -> { Stmt_bodyA[i0] -> MemRef_val[] };
62 ; CHECK-NEXT: Instructions {
63 ; CHECK-NEXT: %val = fadd double 2.100000e+01, 2.100000e+01
65 ; CHECK-NEXT: Stmt_bodyB__TO__bodyB_exit
66 ; CHECK-NEXT: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0]
67 ; CHECK-NEXT: [n] -> { Stmt_bodyB__TO__bodyB_exit[i0] -> MemRef_A[0] };
68 ; CHECK-NEXT: Instructions {
69 ; CHECK-NEXT: %val = fadd double 2.100000e+01, 2.100000e+01
70 ; CHECK-NEXT: %cond = fcmp oeq double 2.100000e+01, 2.100000e+01