[llvm] [LV] Fix emission of debug message in legality check (PR #101924)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 08:32:26 PDT 2024


================
@@ -0,0 +1,35 @@
+; This test asserts that we don't emit both
+; successful and unsuccessful message about vectorization.
+
+; REQUIRES: asserts
+; RUN: opt -passes=loop-vectorize -debug -disable-output < %s 2>&1 | FileCheck %s
+; CHECK-NOT: LV: We can vectorize this loop
+; CHECK: LV: Not vectorizing: Cannot prove legality
+; CHECK-NOT: LV: We can vectorize this loop
+
+ at a = global [32000 x i32] zeroinitializer, align 4
+ at b = global [32000 x i32] zeroinitializer, align 4
+
+define void @foo() {
+entry:
+  %load_a_gep = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4
----------------
fhahn wrote:

pass as arg to simplify test?

https://github.com/llvm/llvm-project/pull/101924


More information about the llvm-commits mailing list