1; RUN: opt %loadPolly -polly-codegen -S \ 2; RUN: < %s | FileCheck %s 3; 4; void pos(float *A, long n) { 5; for (long i = 0; i < 100; i++) 6; A[n % 42] += 1; 7; } 8; 9; CHECK: polly.stmt.bb2: 10; CHECK-NEXT: %p_tmp = srem i64 %n, 42 11; CHECK-NEXT: store i64 %p_tmp, i64* %tmp.s2a 12; 13; CHECK: polly.stmt.bb3: 14; CHECK: %tmp.s2a.reload = load i64, i64* %tmp.s2a 15; CHECK: %p_tmp3 = getelementptr inbounds float, float* %A, i64 %tmp.s2a.reload 16 17define void @pos(float* %A, i64 %n) { 18bb: 19 br label %bb1 20 21bb1: ; preds = %bb6, %bb 22 %i.0 = phi i64 [ 0, %bb ], [ %tmp7, %bb6 ] 23 %exitcond = icmp ne i64 %i.0, 100 24 br i1 %exitcond, label %bb2, label %bb8 25 26bb2: ; preds = %bb1 27 %tmp = srem i64 %n, 42 28 br label %bb3 29 30bb3: 31 %tmp3 = getelementptr inbounds float, float* %A, i64 %tmp 32 %tmp4 = load float, float* %tmp3, align 4 33 %tmp5 = fadd float %tmp4, 1.000000e+00 34 store float %tmp5, float* %tmp3, align 4 35 br label %bb6 36 37bb6: ; preds = %bb2 38 %tmp7 = add nsw i64 %i.0, 1 39 br label %bb1 40 41bb8: ; preds = %bb1 42 ret void 43} 44