Skip to content

[WebAssembly] Enable type checker in annotations.s #111079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion llvm/test/MC/WebAssembly/annotations.s
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading