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
71 lines
2.4 KiB
LLVM
71 lines
2.4 KiB
LLVM
; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s
|
|
|
|
; Test that function pointer casts that require conversions of arguments or
|
|
; return types are converted to unreachable.
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
declare i32 @has_i64_arg(i64)
|
|
declare i32 @has_ptr_arg(ptr)
|
|
|
|
; CHECK-LABEL: test_invalid_rtn:
|
|
; CHECK: i32.const $push[[L0:[0-9]+]]=, 0{{$}}
|
|
; CHECK-NEXT: call $push[[L1:[0-9]+]]=, .Lhas_i64_arg_bitcast_invalid.1, $pop[[L0]]{{$}}
|
|
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: i64.const $push[[L0:[0-9]+]]=, 0{{$}}
|
|
; CHECK-NEXT: call $push[[L1:[0-9]+]]=, .Lhas_i64_arg_bitcast_invalid, $pop[[L0]]{{$}}
|
|
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: end_function
|
|
define void @test_invalid_rtn() {
|
|
entry:
|
|
call i32 @has_i64_arg(i32 0)
|
|
call [1 x i64] @has_i64_arg(i64 0)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: test_struct_rtn:
|
|
; CHECK: call has_i64_arg, $pop6, $pop0
|
|
define void @test_struct_rtn() {
|
|
call {i32, i32} @has_i64_arg(i64 0)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: test_invalid_arg:
|
|
; CHECK: i32.const $push[[L0:[0-9]+]]=, 2{{$}}
|
|
; CHECK-NEXT: call $push[[L1:[0-9]+]]=, .Lhas_ptr_arg_bitcast_invalid.2, $pop[[L0]]{{$}}
|
|
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: i32.const $push[[L0:[0-9]+]]=, 2{{$}}
|
|
; CHECK-NEXT: call $push[[L1:[0-9]+]]=, has_ptr_arg, $pop[[L0]]{{$}}
|
|
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: i64.const $push[[L0:[0-9]+]]=, 3{{$}}
|
|
; CHECK-NEXT: call $push[[L1:[0-9]+]]=, .Lhas_ptr_arg_bitcast_invalid, $pop[[L0]]{{$}}
|
|
; CHECK-NEXT: drop $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: end_function
|
|
define void @test_invalid_arg() {
|
|
entry:
|
|
call i32 @has_ptr_arg(i8 2)
|
|
call i32 @has_ptr_arg(i32 2)
|
|
call i32 @has_ptr_arg(i64 3)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: .Lhas_i64_arg_bitcast_invalid:
|
|
; CHECK-NEXT: .functype .Lhas_i64_arg_bitcast_invalid (i64) -> (i64)
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK-NEXT: end_function
|
|
|
|
; CHECK-LABEL: .Lhas_i64_arg_bitcast_invalid.1:
|
|
; CHECK-NEXT: .functype .Lhas_i64_arg_bitcast_invalid.1 (i32) -> (i32)
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK-NEXT: end_function
|
|
|
|
; CHECK-LABEL: .Lhas_ptr_arg_bitcast_invalid:
|
|
; CHECK-NEXT: .functype .Lhas_ptr_arg_bitcast_invalid (i64) -> (i32)
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK-NEXT: end_function
|
|
|
|
; CHECK-LABEL: .Lhas_ptr_arg_bitcast_invalid.2:
|
|
; CHECK-NEXT: .functype .Lhas_ptr_arg_bitcast_invalid.2 (i32) -> (i32)
|
|
; CHECK-NEXT: unreachable
|
|
; CHECK-NEXT: end_function
|