[llvm] [LV] Fix emission of debug message in legality check (PR #101924)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 14:50:46 PDT 2024
================
@@ -0,0 +1,36 @@
+; This test asserts that we don't emit both
+; successful and unsuccessful message about vectorization.
+
+; RUN: opt -passes=loop-vectorize -debug -disable-output -pass-remarks-missed=loop-vectorize %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
+
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
+
+ at a = global [32000 x i32] zeroinitializer, align 4
+ at b = global [32000 x i32] zeroinitializer, align 4
+
+define void @foo() {
+entry:
+ %.pre = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4
+ %.pre17 = load i32, ptr @a, align 4
+ br label %for.body
+
+for.cond.cleanup: ; preds = %for.body
+ ret void
+
+for.body: ; preds = %entry, %for.body
+ %0 = phi i32 [ %.pre17, %entry ], [ %add6, %for.body ]
----------------
artagnon wrote:
Would be nice to give the variables better names: `%0`, `%1`, `%.pre`, `%.pre17` etc.
https://github.com/llvm/llvm-project/pull/101924
More information about the llvm-commits
mailing list