[llvm] Add -verify-with-context option to enable better reporting of verifier errors (PR #84867)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 07:19:56 PDT 2024


================
@@ -0,0 +1,31 @@
+; RUN: not opt -S %s -passes=verify -verify-with-context 2>&1 | FileCheck %s
+
+declare i32 @foo(i32)
+define i32 @test_callbr_landingpad_not_first_inst() {
+entry:
+  %0 = callbr i32 asm "", "=r,!i"()
+          to label %asm.fallthrough [label %landingpad]
+
+asm.fallthrough:
+  ret i32 42
+
+landingpad:
+  %foo = call i32 @foo(i32 42)
+; CHECK: Verification Error: No other instructions may proceed intrinsic
----------------
arsenm wrote:

Should be "precede" not "proceed"?

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


More information about the llvm-commits mailing list