1; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-code \ 2; RUN: -disable-output < %s | \ 3; RUN: FileCheck -check-prefix=CODE %s 4; 5; REQUIRES: pollyacc 6; 7; void foo(float A[], float B[]) { 8; for (long i = 0; i < 1024; i++) 9; A[2 * i] = B[i]; 10; } 11 12; CODE: cudaCheckReturn(cudaMemcpy(dev_MemRef_B, MemRef_B, (1024) * sizeof(i32), cudaMemcpyHostToDevice)); 13; CODE-NEXT: cudaCheckReturn(cudaMemcpy(dev_MemRef_A, MemRef_A, (2047) * sizeof(i32), cudaMemcpyHostToDevice)); 14 15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 16 17define void @foo(float* %A, float* %B) { 18bb: 19 br label %bb1 20 21bb1: ; preds = %bb8, %bb 22 %i.0 = phi i64 [ 0, %bb ], [ %tmp9, %bb8 ] 23 %exitcond = icmp ne i64 %i.0, 1024 24 br i1 %exitcond, label %bb2, label %bb10 25 26bb2: ; preds = %bb1 27 %tmp = getelementptr inbounds float, float* %B, i64 %i.0 28 %tmp3 = bitcast float* %tmp to i32* 29 %tmp4 = load i32, i32* %tmp3, align 4 30 %tmp5 = shl nsw i64 %i.0, 1 31 %tmp6 = getelementptr inbounds float, float* %A, i64 %tmp5 32 %tmp7 = bitcast float* %tmp6 to i32* 33 store i32 %tmp4, i32* %tmp7, align 4 34 br label %bb8 35 36bb8: ; preds = %bb2 37 %tmp9 = add nuw nsw i64 %i.0, 1 38 br label %bb1 39 40bb10: ; preds = %bb1 41 ret void 42} 43