[llvm] [mlir] [IR][PGO] Verify invalid `MD_prof` metadata on instructions (PR #145576)
Christian Ulmann via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 23:27:03 PDT 2025
================
@@ -0,0 +1,39 @@
+; Test MD_prof validation
+
+; RUN: split-file %s %t
+; RUN: opt -passes=verify %t/valid.ll --disable-output
+; RUN: not opt -passes=verify %t/invalid1.ll --disable-output 2>&1 | FileCheck %s
+; RUN: not opt -passes=verify %t/invalid2.ll --disable-output 2>&1 | FileCheck %s
----------------
Dinistro wrote:
Seems a bit ad-hoc to share the rely on the check annotation of the source file. I'm unsure how this is done normally, so maybe this is fine(?).
I would probably pass `%t/invalid1.ll` and `%t/invalid2.ll` to `FileCheck` instead of `%s` in both cases.
https://github.com/llvm/llvm-project/pull/145576
More information about the llvm-commits
mailing list