1 ; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -S | FileCheck %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-S128"
5 ;CHECK-LABEL: @add_ints(
8 ;CHECK-DAG: getelementptr
17 define void @add_ints(i32* nocapture %A, i32* nocapture %B, i32* nocapture %C) {
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