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
119 lines
4.7 KiB
LLVM
119 lines
4.7 KiB
LLVM
; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
|
|
; RUN: not llvm-as -use-constant-int-for-fixed-length-splat < %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
declare void @llvm.test.immarg.intrinsic.i32(i32 immarg)
|
|
declare void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> immarg)
|
|
declare void @llvm.test.immarg.intrinsic.f32(float immarg)
|
|
declare void @llvm.test.immarg.intrinsic.v2f32(<2 x float> immarg)
|
|
declare void @llvm.test.immarg.intrinsic.2ai32([2 x i32] immarg)
|
|
|
|
@gv = global i32 undef, align 4
|
|
|
|
define void @call_llvm.test.immarg.intrinsic.i32(i32 %arg) {
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: i32 undef
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.i32(i32 undef)
|
|
call void @llvm.test.immarg.intrinsic.i32(i32 undef)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: i32 %arg
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.i32(i32 %arg)
|
|
call void @llvm.test.immarg.intrinsic.i32(i32 %arg)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: i32 ptrtoint (ptr @gv to i32)
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.i32(i32 ptrtoint (ptr @gv to i32))
|
|
call void @llvm.test.immarg.intrinsic.i32(i32 ptrtoint (ptr @gv to i32))
|
|
ret void
|
|
}
|
|
|
|
define void @call_llvm.test.immarg.intrinsic.f32() {
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: float undef
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.f32(float undef)
|
|
call void @llvm.test.immarg.intrinsic.f32(float undef)
|
|
ret void
|
|
}
|
|
|
|
define void @call_llvm.test.immarg.intrinsic.v2i32() {
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x i32> zeroinitializer
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> zeroinitializer)
|
|
call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> zeroinitializer)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x i32> <i32 1, i32 2>
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> <i32 1, i32 2>)
|
|
call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> <i32 1, i32 2>)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x i32> splat (i32 1)
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> splat (i32 1))
|
|
call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> splat (i32 1))
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x i32> undef
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> undef)
|
|
call void @llvm.test.immarg.intrinsic.v2i32(<2 x i32> undef)
|
|
ret void
|
|
}
|
|
|
|
define void @call_llvm.test.immarg.intrinsic.v2f32() {
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x float> zeroinitializer
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2f32(<2 x float> zeroinitializer)
|
|
call void @llvm.test.immarg.intrinsic.v2f32(<2 x float> zeroinitializer)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x float> <float 1.000000e+00, float 2.000000e+00>
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2f32(<2 x float> <float 1.000000e+00, float 2.000000e+00>)
|
|
call void @llvm.test.immarg.intrinsic.v2f32(<2 x float> <float 1.0, float 2.0>)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: <2 x float> splat (float 1.000000e+00)
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.v2f32(<2 x float> splat (float 1.000000e+00))
|
|
call void @llvm.test.immarg.intrinsic.v2f32(<2 x float> splat (float 1.0))
|
|
ret void
|
|
}
|
|
|
|
define void @call_llvm.test.immarg.intrinsic.2ai32() {
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: [2 x i32] zeroinitializer
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.2ai32([2 x i32] zeroinitializer)
|
|
call void @llvm.test.immarg.intrinsic.2ai32([2 x i32] zeroinitializer)
|
|
|
|
; CHECK: immarg operand has non-immediate parameter
|
|
; CHECK-NEXT: [2 x i32] [i32 1, i32 2]
|
|
; CHECK-NEXT: call void @llvm.test.immarg.intrinsic.2ai32([2 x i32] [i32 1, i32 2])
|
|
call void @llvm.test.immarg.intrinsic.2ai32([2 x i32] [i32 1, i32 2])
|
|
ret void
|
|
}
|
|
|
|
; CHECK: immarg attribute only applies to intrinsics
|
|
; CHECK-NEXT: ptr @not_an_intrinsic
|
|
declare void @not_an_intrinsic(i32 immarg)
|
|
|
|
declare void @llvm.test.intrinsic(i32)
|
|
declare void @func(i32)
|
|
|
|
define void @only_on_callsite() {
|
|
; CHECK: immarg attribute only applies to intrinsics
|
|
; CHECK-NEXT: call void @func(i32 immarg 0)
|
|
; CHECK-NEXT: immarg may not apply only to call sites
|
|
; CHECK-NEXT: i32 0
|
|
; CHECK-NEXT: call void @func(i32 immarg 0)
|
|
call void @func(i32 immarg 0)
|
|
|
|
; CHECK: immarg may not apply only to call sites
|
|
; CHECK-NEXT: i32 0
|
|
; CHECK-NEXT: call void @llvm.test.intrinsic(i32 immarg 0)
|
|
call void @llvm.test.intrinsic(i32 immarg 0)
|
|
ret void
|
|
}
|
|
|
|
; CHECK: immarg attribute only applies to intrinsics
|
|
; CHECK: ptr @on_function_definition
|
|
define void @on_function_definition(i32 immarg %arg) {
|
|
ret void
|
|
}
|