1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; ModuleID = 'pr43771.s'
3 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"
4 target triple = "x86_64-unknown-linux-gnu"
6 define void @_Z16KWayNodeRefine__iPiS_S_(i32 %nparts, i32* %gpwgts, i32* %badminpwgt, i32* %badmaxpwgt) nounwind uwtable {
10 for.cond: ; preds = %for.inc, %entry
11 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
12 %tmp = mul i64 %indvar, 2
13 %tmp5 = add i64 %tmp, 1
14 %arrayidx36 = getelementptr i32* %badmaxpwgt, i64 %tmp5
15 %arrayidx8 = getelementptr i32* %gpwgts, i64 %tmp5
16 %arrayidx15 = getelementptr i32* %badminpwgt, i64 %tmp5
17 %arrayidx40 = getelementptr i32* %badmaxpwgt, i64 %tmp
18 %arrayidx = getelementptr i32* %gpwgts, i64 %tmp
19 %arrayidx19 = getelementptr i32* %badminpwgt, i64 %tmp
20 %i.0 = trunc i64 %tmp to i32
21 %cmp = icmp slt i32 %i.0, %nparts
22 br i1 %cmp, label %for.body, label %for.end
24 for.body: ; preds = %for.cond
25 %tmp4 = load i32* %arrayidx, align 4
26 %tmp9 = load i32* %arrayidx8, align 4
27 %add10 = add nsw i32 %tmp4, %tmp9
28 store i32 %add10, i32* %arrayidx15, align 4
29 store i32 %add10, i32* %arrayidx19, align 4
30 %tmp24 = load i32* %arrayidx, align 4
31 %tmp30 = load i32* %arrayidx8, align 4
32 %add31 = add nsw i32 %tmp24, %tmp30
33 store i32 %add31, i32* %arrayidx36, align 4
34 store i32 %add31, i32* %arrayidx40, align 4
37 for.inc: ; preds = %for.body
38 %indvar.next = add i64 %indvar, 1
41 for.end: ; preds = %for.cond