1; RUN: opt < %s  -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -S | FileCheck %s
2
3target 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-S128"
4
5;CHECK-LABEL: @add_ints(
6;CHECK: br
7;CHECK: getelementptr
8;CHECK-DAG: getelementptr
9;CHECK-DAG: icmp ugt
10;CHECK-DAG: icmp ugt
11;CHECK-DAG: icmp ugt
12;CHECK-DAG: icmp ugt
13;CHECK-DAG: and
14;CHECK-DAG: and
15;CHECK: br
16;CHECK: ret
17define void @add_ints(i32* nocapture %A, i32* nocapture %B, i32* nocapture %C) {
18entry:
19  br label %for.body
20
21for.body:
22  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
23  %arrayidx = getelementptr inbounds i32, i32* %B, i64 %indvars.iv
24  %0 = load i32, i32* %arrayidx, align 4
25  %arrayidx2 = getelementptr inbounds i32, i32* %C, i64 %indvars.iv
26  %1 = load i32, i32* %arrayidx2, align 4
27  %add = add nsw i32 %1, %0
28  %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
29  store i32 %add, i32* %arrayidx4, align 4
30  %indvars.iv.next = add i64 %indvars.iv, 1
31  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
32  %exitcond = icmp eq i32 %lftr.wideiv, 200
33  br i1 %exitcond, label %for.end, label %for.body
34
35for.end:
36  ret void
37}
38