1 ; RUN: opt %loadPolly -polly-codegen \
2 ; RUN: -S < %s | FileCheck %s
4 ; This will just check that we generate valid code here.
8 ; void f(int *A, int *B) {
9 ; for (int i = 0; i < 1024; i++)
10 ; A[i % 3] = B[i / 42];
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 define void @f(ptr %A, ptr %B, i32 %N) {
19 bb1: ; preds = %bb9, %bb
20 %i.0 = phi i32 [ 0, %bb ], [ %tmp10, %bb9 ]
21 %exitcond = icmp ne i32 %i.0, %N
22 br i1 %exitcond, label %bb2, label %bb11
25 %tmp = sdiv i32 %i.0, 42
26 %tmp3 = sext i32 %tmp to i64
27 %tmp4 = getelementptr inbounds i32, ptr %B, i64 %tmp3
28 %tmp5 = load i32, ptr %tmp4, align 4
29 %tmp6 = srem i32 %i.0, 3
30 %tmp7 = sext i32 %tmp6 to i64
31 %tmp8 = getelementptr inbounds i32, ptr %A, i64 %tmp7
32 store i32 %tmp5, ptr %tmp8, align 4
36 %tmp10 = add nuw nsw i32 %i.0, 1