Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

118 lines
3.4 KiB
YAML

# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling -run-pass wasm-cfg-stackify %s -o - | FileCheck %s
--- |
target triple = "wasm32-unknown-unknown"
declare i32 @__gxx_wasm_personality_v0(...)
declare void @foo()
define void @rethrow_arg_test() personality ptr @__gxx_wasm_personality_v0 {
ret void
}
define i32 @fix_end_function_test() personality ptr @__gxx_wasm_personality_v0 {
ret i32 0
}
...
---
# CHECK-LABEL: name: rethrow_arg_test
name: rethrow_arg_test
liveins:
- { reg: '$arguments' }
body: |
bb.0:
successors: %bb.1, %bb.3
; CHECK: bb.0:
; CHECK: TRY
EH_LABEL <mcsymbol .Ltmp0>
CALL @foo, implicit-def dead $arguments, implicit $sp32, implicit $sp64
EH_LABEL <mcsymbol .Ltmp1>
BR %bb.3, implicit-def dead $arguments
bb.1 (landing-pad):
successors: %bb.2
; CHECK: bb.1 (landing-pad):
; CHECK: CATCH_LEGACY
; CHECK: TRY
; This RETHROW rethrows the exception caught by this BB's CATCH_LEGACY, but
; after CFGStackify a TRY is placed between the CATCH_LEGACY and this
; RETHROW, so after CFGStackify its immediate argument should become not 0,
; but 1.
; CHECK: RETHROW 1
EH_LABEL <mcsymbol .Ltmp2>
%0:i32 = CATCH_LEGACY &__cpp_exception, implicit-def dead $arguments
RETHROW %bb.1, implicit-def dead $arguments
bb.2 (landing-pad):
successors: %bb.3
; CHECK: bb.2 (landing-pad):
; CHECK: CATCH_LEGACY
; CHECK: RETHROW 0
EH_LABEL <mcsymbol .Ltmp3>
%1:i32 = CATCH_LEGACY &__cpp_exception, implicit-def dead $arguments
RETHROW %bb.2, implicit-def dead $arguments
bb.3:
; CHECK: bb.3:
; CHECK: END_TRY
; CHECK: END_TRY
RETURN implicit-def dead $arguments
...
---
# This function has i32 return type and the end of the function is unreachable,
# so CFGStackify's fixEndsAtEndOfFunction() propagates the return type while
# they encounter 'end' or 'delegate'. This is a regression test for a bug that
# we only handled 'end' but not 'delegate'.
# CHECK-LABEL: name: fix_end_function_test
name: fix_end_function_test
liveins:
- { reg: '$arguments' }
machineFunctionInfo:
params: [ ]
results: [ i32 ]
body: |
; CHECK: TRY 127
; CHECK: TRY 127
; CHECK: CALL @foo
; CHECK: TRY 64
; CHECK: CALL @foo
; CHECK: DELEGATE
; CHECK: RETURN
; CHECK: CATCH_LEGACY
;; This TRY should have the return type i32 (127)
; CHECK: TRY 127
; CHECK: RETHROW
; CHECK: DELEGATE
; CHECK: END_TRY
; CHECK: CATCH_LEGACY
; CHECK: RETHROW
; CHECK: END_TRY
bb.0:
successors: %bb.1, %bb.3, %bb.4
EH_LABEL <mcsymbol .Ltmp0>
CALL @foo, implicit-def dead $arguments, implicit $sp32, implicit $sp64
EH_LABEL <mcsymbol .Ltmp1>
bb.1:
successors: %bb.2, %bb.4
EH_LABEL <mcsymbol .Ltmp2>
CALL @foo, implicit-def dead $arguments, implicit $sp32, implicit $sp64
EH_LABEL <mcsymbol .Ltmp3>
bb.2:
%0:i32 = CONST_I32 3, implicit-def dead $arguments
RETURN %0:i32, implicit-def dead $arguments
bb.3 (landing-pad):
successors:
EH_LABEL <mcsymbol .Ltmp4>
%0:i32 = CATCH_LEGACY &__cpp_exception, implicit-def dead $arguments
RETHROW %bb.3, implicit-def dead $arguments
bb.4 (landing-pad):
successors:
EH_LABEL <mcsymbol .Ltmp5>
%1:i32 = CATCH_LEGACY &__cpp_exception, implicit-def dead $arguments
RETHROW %bb.4, implicit-def dead $arguments
...