1; RUN: opt %loadPolly -polly-import-jscop \ 2; RUN: -polly-import-jscop-postfix=transformed -polly-codegen \ 3; RUN: < %s -S | FileCheck %s 4 5; CHECK-LABEL: polly.stmt.loop1: 6; CHECK-NEXT: %3 = mul nsw i64 5, %polly.indvar{{[0-9]*}} 7; CHECK-NEXT: %4 = sub nsw i64 %3, 10 8; CHECK-NEXT: %polly.access.A = getelementptr double, double* %A, i64 %4 9; CHECK-NEXT: store double 4.200000e+01, double* %polly.access.A, align 8 10 11; CHECK-LABEL: polly.stmt.loop2: 12; CHECK-NEXT: %polly.access.A[[Num0:[0-9]*]] = getelementptr double, double* %A, i64 42 13; CHECK-NEXT: %val_p_scalar_ = load double, double* %polly.access.A[[Num0]], align 8 14 15; CHECK-LABEL: polly.stmt.loop3: 16; CHECK-NEXT: %val.s2a.reload = load double, double* %val.s2a 17; CHECK-NEXT: [[REG0:%.*]] = mul nsw i64 13, %polly.indvar{{[0-9]*}} 18; CHECK-NEXT: [[REG1:%.*]] = add nsw i64 [[REG0]], 5 19; CHECK-NEXT: %polly.access.A[[Num1:[0-9]*]] = getelementptr double, double* %A, i64 [[REG1]] 20; CHECK-NEXT: store double %val.s2a.reload, double* %polly.access.A[[Num1]], align 8, 21 22target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 23 24define void @update_access_functions(i64 %arg, double* %A) { 25bb3: 26 br label %loop1 27 28loop1: 29 %indvar = phi i64 [ %indvar.next, %loop1 ], [ 1, %bb3 ] 30 %ptr1 = getelementptr inbounds double, double* %A, i64 %indvar 31 store double 42.0, double* %ptr1, align 8 32 %indvar.next = add nuw nsw i64 %indvar, 1 33 %cmp = icmp ne i64 %indvar.next, %arg 34 br i1 %cmp, label %loop1, label %loop2 35 36loop2: 37 %indvar.2 = phi i64 [ %indvar.2.next, %loop2 ], [ 1, %loop1 ] 38 %ptr2 = getelementptr inbounds double, double* %A, i64 %indvar.2 39 %val = load double, double* %ptr2, align 8 40 %indvar.2.next = add nuw nsw i64 %indvar.2, 1 41 %cmp.2 = icmp ne i64 %indvar.2.next, %arg 42 br i1 %cmp.2, label %loop2, label %loop3 43 44loop3: 45 %indvar.3 = phi i64 [ %indvar.3.next, %loop3 ], [ 1, %loop2 ] 46 %ptr3 = getelementptr inbounds double, double* %A, i64 %indvar.3 47 store double %val, double* %ptr3, align 8 48 %indvar.3.next = add nuw nsw i64 %indvar.3, 1 49 %cmp.3 = icmp ne i64 %indvar.3.next, %arg 50 br i1 %cmp.3, label %loop3, label %exit 51 52exit: 53 ret void 54} 55