1 ; RUN: opt %loadPolly -polly-print-simplify -disable-output< %s | FileCheck %s -match-full-lines
2 ; RUN: opt %loadPolly -polly-simplify -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
4 ; for (int i = 0; i < n; i+=1) {
10 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {
15 %j = phi i32 [0, %entry], [%j.inc, %inc]
16 %j.cmp = icmp slt i32 %j, %n
17 br i1 %j.cmp, label %region_entry, label %exit
21 %val = load double, ptr %A
22 %cmp = fcmp oeq double 21.0, 0.0
23 br i1 %cmp, label %region_true, label %region_exit
26 store double 42.0, ptr %B
37 %j.inc = add nuw nsw i32 %j, 1
49 ; CHECK: Dead accesses removed: 1
50 ; CHECK: Dead instructions removed: 1
53 ; CHECK: After accesses {
54 ; CHECK-NEXT: Stmt_region_entry__TO__region_exit
55 ; CHECK-NEXT: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0]
56 ; CHECK-NEXT: [n] -> { Stmt_region_entry__TO__region_exit[i0] -> MemRef_B[0] };
60 ; CODEGEN: polly.stmt.region_entry:
61 ; CODEGEN-NEXT: %p_cmp = fcmp oeq double 2.100000e+01, 0.000000e+00
62 ; CODEGEN-NEXT: br i1 %p_cmp