[llvm] [WebAssembly] Enable type checker in annotations.s (PR #111079)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 17:31:31 PDT 2024
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/111079
None
>From 3589501feb3e1383ac0669af3fdaf9cd7c4a0645 Mon Sep 17 00:00:00 2001
From: Heejin Ahn <aheejin at gmail.com>
Date: Fri, 4 Oct 2024 00:30:43 +0000
Subject: [PATCH] [WebAssembly] Enable type checker in annotations.s
---
llvm/test/MC/WebAssembly/annotations.s | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/llvm/test/MC/WebAssembly/annotations.s b/llvm/test/MC/WebAssembly/annotations.s
index 3e727591afa942..59a1349f6eaf20 100644
--- a/llvm/test/MC/WebAssembly/annotations.s
+++ b/llvm/test/MC/WebAssembly/annotations.s
@@ -1,4 +1,4 @@
-# RUN: llvm-mc -no-type-check -triple=wasm32-unknown-unknown -mattr=+exception-handling < %s | FileCheck %s
+# RUN: llvm-mc -triple=wasm32-unknown-unknown -mattr=+exception-handling < %s | FileCheck %s
# Tests if block/loop/try/catch/end/branch/rethrow instructions are correctly
# printed with their annotations.
@@ -12,15 +12,19 @@ test_annotation:
try
br 0
catch __cpp_exception
+ drop
block
+ i32.const 0
br_if 0
loop
+ i32.const 0
br_if 1
end_loop
end_block
try
rethrow 0
catch __cpp_exception
+ drop
catch_all
block
try
@@ -56,15 +60,19 @@ test_annotation:
# CHECK: try
# CHECK-NEXT: br 0 # 0: down to label0
# CHECK-NEXT: catch __cpp_exception # catch0:
+# CHECK-NEXT: drop
# CHECK-NEXT: block
+# CHECK-NEXT: i32.const 0
# CHECK-NEXT: br_if 0 # 0: down to label1
# CHECK-NEXT: loop # label2:
+# CHECK-NEXT: i32.const 0
# CHECK-NEXT: br_if 1 # 1: down to label1
# CHECK-NEXT: end_loop
# CHECK-NEXT: end_block # label1:
# CHECK-NEXT: try
# CHECK-NEXT: rethrow 0 # down to catch3
# CHECK-NEXT: catch __cpp_exception # catch3:
+# CHECK-NEXT: drop
# CHECK-NEXT: catch_all{{$}}
# CHECK-NEXT: block
# CHECK-NEXT: try
More information about the llvm-commits
mailing list