1 ; RUN: opt -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -S < %s | FileCheck %s
2 @a = common global [128 x i32] zeroinitializer, align 16
4 ;; Must not vectorize division reduction. Division is lossy.
11 ; CHECK-NOT: sdiv <2 x i32>
12 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
13 %r.05 = phi i32 [ 80, %entry ], [ %div, %for.body ]
14 %arrayidx = getelementptr inbounds [128 x i32], ptr @a, i64 0, i64 %indvars.iv
15 %0 = load i32, ptr %arrayidx, align 4
16 %div = sdiv i32 %r.05, %0
17 %indvars.iv.next = add i64 %indvars.iv, 1
18 %lftr.wideiv = trunc i64 %indvars.iv.next to i32
19 %exitcond = icmp eq i32 %lftr.wideiv, 1024
20 br i1 %exitcond, label %for.end, label %for.body