1; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines 2; RUN: opt %loadPolly -polly-simplify -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN 3; 4; for (int i = 0; i < n; i+=1) { 5; (void)A[0]; 6; if (21.0 == 0.0) 7; B[0] = 42.0; 8; } 9; 10define void @func(i32 %n, double* noalias nonnull %A, double* noalias nonnull %B) { 11entry: 12 br label %for 13 14for: 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 18 19 20 region_entry: 21 %val = load double, double* %A 22 %cmp = fcmp oeq double 21.0, 0.0 23 br i1 %cmp, label %region_true, label %region_exit 24 25 region_true: 26 store double 42.0, double* %B 27 br label %region_exit 28 29 region_exit: 30 br label %body 31 32 body: 33 br label %inc 34 35 36inc: 37 %j.inc = add nuw nsw i32 %j, 1 38 br label %for 39 40exit: 41 br label %return 42 43return: 44 ret void 45} 46 47 48; CHECK: Statistics { 49; CHECK: Dead accesses removed: 1 50; CHECK: Dead instructions removed: 1 51; CHECK: } 52 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] }; 57; CHECK-NEXT: } 58 59 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 63