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
133 lines
5.2 KiB
LLVM
133 lines
5.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
|
|
; RUN: opt -mtriple=wasm32-unknown-unknown -S --passes=expand-variadics --expand-variadics-override=optimize < %s | FileCheck %s -check-prefixes=CHECK,OPT
|
|
; RUN: opt -mtriple=wasm32-unknown-unknown -S --passes=expand-variadics --expand-variadics-override=lowering < %s | FileCheck %s -check-prefixes=CHECK,ABI
|
|
; REQUIRES: webassembly-registered-target
|
|
|
|
declare void @llvm.lifetime.start.p0(ptr nocapture)
|
|
|
|
declare void @llvm.va_copy.p0(ptr, ptr)
|
|
|
|
declare void @valist(ptr noundef)
|
|
|
|
declare void @llvm.lifetime.end.p0(ptr nocapture)
|
|
|
|
declare void @llvm.va_start.p0(ptr)
|
|
|
|
declare void @llvm.va_end.p0(ptr)
|
|
|
|
|
|
define void @start_once(...) !prof !0 {
|
|
; OPT-LABEL: @start_once(
|
|
; OPT-NEXT: entry:
|
|
; OPT-NEXT: [[VA_START:%.*]] = alloca ptr, align 4
|
|
; OPT-NEXT: call void @llvm.lifetime.start.p0(ptr [[VA_START]])
|
|
; OPT-NEXT: call void @llvm.va_start.p0(ptr [[VA_START]])
|
|
; OPT-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VA_START]], align 4
|
|
; OPT-NEXT: call void @start_once.valist(ptr [[TMP0]])
|
|
; OPT-NEXT: call void @llvm.lifetime.end.p0(ptr [[VA_START]])
|
|
; OPT-NEXT: ret void
|
|
;
|
|
; ABI-LABEL: @start_once(
|
|
; ABI-NEXT: entry:
|
|
; ABI-NEXT: [[S:%.*]] = alloca ptr, align 4
|
|
; ABI-NEXT: call void @llvm.lifetime.start.p0(ptr nonnull [[S]])
|
|
; ABI-NEXT: store ptr [[VARARGS:%.*]], ptr [[S]], align 4
|
|
; ABI-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S]], align 4
|
|
; ABI-NEXT: call void @valist(ptr noundef [[TMP0]])
|
|
; ABI-NEXT: call void @llvm.lifetime.end.p0(ptr nonnull [[S]])
|
|
; ABI-NEXT: ret void
|
|
;
|
|
entry:
|
|
%s = alloca ptr, align 4
|
|
call void @llvm.lifetime.start.p0(ptr nonnull %s)
|
|
call void @llvm.va_start.p0(ptr nonnull %s)
|
|
%0 = load ptr, ptr %s, align 4
|
|
call void @valist(ptr noundef %0)
|
|
call void @llvm.va_end.p0(ptr %s)
|
|
call void @llvm.lifetime.end.p0(ptr nonnull %s)
|
|
ret void
|
|
}
|
|
|
|
|
|
define void @start_twice(...) {
|
|
; OPT-LABEL: @start_twice(
|
|
; OPT-NEXT: entry:
|
|
; OPT-NEXT: [[VA_START:%.*]] = alloca ptr, align 4
|
|
; OPT-NEXT: call void @llvm.lifetime.start.p0(ptr [[VA_START]])
|
|
; OPT-NEXT: call void @llvm.va_start.p0(ptr [[VA_START]])
|
|
; OPT-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VA_START]], align 4
|
|
; OPT-NEXT: call void @start_twice.valist(ptr [[TMP0]])
|
|
; OPT-NEXT: call void @llvm.lifetime.end.p0(ptr [[VA_START]])
|
|
; OPT-NEXT: ret void
|
|
;
|
|
; ABI-LABEL: @start_twice(
|
|
; ABI-NEXT: entry:
|
|
; ABI-NEXT: [[S0:%.*]] = alloca ptr, align 4
|
|
; ABI-NEXT: [[S1:%.*]] = alloca ptr, align 4
|
|
; ABI-NEXT: call void @llvm.lifetime.start.p0(ptr nonnull [[S0]])
|
|
; ABI-NEXT: call void @llvm.lifetime.start.p0(ptr nonnull [[S1]])
|
|
; ABI-NEXT: store ptr [[VARARGS:%.*]], ptr [[S0]], align 4
|
|
; ABI-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S0]], align 4
|
|
; ABI-NEXT: call void @valist(ptr noundef [[TMP0]])
|
|
; ABI-NEXT: store ptr [[VARARGS]], ptr [[S1]], align 4
|
|
; ABI-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S1]], align 4
|
|
; ABI-NEXT: call void @valist(ptr noundef [[TMP1]])
|
|
; ABI-NEXT: call void @llvm.lifetime.end.p0(ptr nonnull [[S1]])
|
|
; ABI-NEXT: call void @llvm.lifetime.end.p0(ptr nonnull [[S0]])
|
|
; ABI-NEXT: ret void
|
|
;
|
|
entry:
|
|
%s0 = alloca ptr, align 4
|
|
%s1 = alloca ptr, align 4
|
|
call void @llvm.lifetime.start.p0(ptr nonnull %s0)
|
|
call void @llvm.lifetime.start.p0(ptr nonnull %s1)
|
|
call void @llvm.va_start.p0(ptr nonnull %s0)
|
|
%0 = load ptr, ptr %s0, align 4
|
|
call void @valist(ptr noundef %0)
|
|
call void @llvm.va_end.p0(ptr %s0)
|
|
call void @llvm.va_start.p0(ptr nonnull %s1)
|
|
%1 = load ptr, ptr %s1, align 4
|
|
call void @valist(ptr noundef %1)
|
|
call void @llvm.va_end.p0(ptr %s1)
|
|
call void @llvm.lifetime.end.p0(ptr nonnull %s1)
|
|
call void @llvm.lifetime.end.p0(ptr nonnull %s0)
|
|
ret void
|
|
}
|
|
|
|
define void @copy(ptr noundef %va) {
|
|
; CHECK-LABEL: @copy(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[VA_ADDR:%.*]] = alloca ptr, align 4
|
|
; CHECK-NEXT: [[CP:%.*]] = alloca ptr, align 4
|
|
; CHECK-NEXT: store ptr [[VA:%.*]], ptr [[VA_ADDR]], align 4
|
|
; CHECK-NEXT: call void @llvm.lifetime.start.p0(ptr nonnull [[CP]])
|
|
; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr [[CP]], ptr [[VA_ADDR]], i32 4, i1 false)
|
|
; CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr [[CP]], align 4
|
|
; CHECK-NEXT: call void @valist(ptr noundef [[TMP0]])
|
|
; CHECK-NEXT: call void @llvm.lifetime.end.p0(ptr nonnull [[CP]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
entry:
|
|
%va.addr = alloca ptr, align 4
|
|
%cp = alloca ptr, align 4
|
|
store ptr %va, ptr %va.addr, align 4
|
|
call void @llvm.lifetime.start.p0(ptr nonnull %cp)
|
|
call void @llvm.va_copy.p0(ptr nonnull %cp, ptr nonnull %va.addr)
|
|
%0 = load ptr, ptr %cp, align 4
|
|
call void @valist(ptr noundef %0)
|
|
call void @llvm.lifetime.end.p0(ptr nonnull %cp)
|
|
ret void
|
|
}
|
|
|
|
!0 = !{!"function_entry_count", i64 1000}
|
|
;.
|
|
; OPT: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
|
; OPT: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn }
|
|
;.
|
|
; ABI: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
|
;.
|
|
; OPT: [[META0:![0-9]+]] = !{!"function_entry_count", i64 1000}
|
|
;.
|
|
; ABI: [[META0:![0-9]+]] = !{!"function_entry_count", i64 1000}
|
|
;.
|