1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 pr39529.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr39529.s > pr39529.ll
6 ; ModuleID = 'pr39529.s'
7 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
8 target triple = "x86_64-unknown-linux-gnu"
10 define void @foo() nounwind uwtable {
12 %a = alloca [1024 x i8], align 16
13 %add.ptr = getelementptr inbounds [1024 x i8]* %a, i64 0, i64 1024
16 do.body: ; preds = %do.cond, %entry
17 %indvar = phi i64 [ %indvar.next, %do.cond ], [ 0, %entry ]
18 %tmp = mul i64 %indvar, 2
19 %tmp1 = add i64 %tmp, 1
20 %add.ptr6 = getelementptr [1024 x i8]* %a, i64 0, i64 %tmp1
21 %p.0 = getelementptr [1024 x i8]* %a, i64 0, i64 %tmp
22 %tmp2 = add i64 %tmp, 2
23 %add.ptr2 = getelementptr [1024 x i8]* %a, i64 0, i64 %tmp2
24 store i8 1, i8* %p.0, align 1
25 store i8 1, i8* %add.ptr6, align 1
28 do.cond: ; preds = %do.body
29 %cmp = icmp ult i8* %add.ptr2, %add.ptr
30 %indvar.next = add i64 %indvar, 1
31 br i1 %cmp, label %do.body, label %do.end
33 do.end: ; preds = %do.cond