33 lines · plain
1; This test checks that we don't emit both2; successful and unsuccessful message about vectorization.3 4; REQUIRES: asserts5; RUN: opt -passes=loop-vectorize -debug -disable-output < %s 2>&1 | FileCheck %s6; CHECK-NOT: LV: We can vectorize this loop7; CHECK: LV: Not vectorizing: Cannot prove legality8; CHECK-NOT: LV: We can vectorize this loop9 10@a = global [32000 x i32] zeroinitializer, align 411 12define void @foo(i32 %val1, i32 %val2) {13entry:14 br label %for.body15 16for.body: ; preds = %entry, %for.body17 %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 %iv21 %iv.next = add nuw nsw i64 %iv, 122 %arrayidx2 = getelementptr inbounds [32000 x i32], ptr @a, i64 0, i64 %iv.next23 %2 = load i32, ptr %arrayidx2, align 424 %add0 = add nsw i32 %2, %125 %add1 = add nsw i32 %add0, %026 store i32 %add1, ptr %arrayidx, align 427 %exitcond = icmp eq i64 %iv.next, 3199928 br i1 %exitcond, label %exit, label %for.body29 30exit: ; preds = %for.body31 ret void32}33