1; This test checks that we don't emit both 2; successful and unsuccessful message about vectorization. 3 4; REQUIRES: asserts 5; RUN: opt -passes=loop-vectorize -debug -disable-output < %s 2>&1 | FileCheck %s 6; CHECK-NOT: LV: We can vectorize this loop 7; CHECK: LV: Not vectorizing: Cannot prove legality 8; CHECK-NOT: LV: We can vectorize this loop 9 10@a = global [32000 x i32] zeroinitializer, align 4 11 12define void @foo(i32 %val1, i32 %val2) { 13entry: 14 br label %for.body 15 16for.body: ; preds = %entry, %for.body 17 %0 = phi i32 [ %val1, %entry ], [ %add1, %for.body ] 18 %1 = phi i32 [ %val2, %entry ], [ %2, %for.body ] 19 %iv = phi i64 [ 1, %entry ], [ %iv.next, %for.body ] 20 %arrayidx = getelementptr inbounds [32000 x i32], ptr @a, i64 0, i64 %iv 21 %iv.next = add nuw nsw i64 %iv, 1 22 %arrayidx2 = getelementptr inbounds [32000 x i32], ptr @a, i64 0, i64 %iv.next 23 %2 = load i32, ptr %arrayidx2, align 4 24 %add0 = add nsw i32 %2, %1 25 %add1 = add nsw i32 %add0, %0 26 store i32 %add1, ptr %arrayidx, align 4 27 %exitcond = icmp eq i64 %iv.next, 31999 28 br i1 %exitcond, label %exit, label %for.body 29 30exit: ; preds = %for.body 31 ret void 32} 33