Files
TheRock/compiler/amd-llvm/llvm/test/Verifier/sat-intrinsics.ll
T
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

45 lines
1.7 KiB
LLVM

; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s
define i32 @sadd_arg_int(float %x, i32 %y) {
; CHECK: intrinsic argument 0 type (matching overload type 0) expected i32, but got float
%r = call i32 @llvm.sadd.sat.i32(float %x, i32 %y)
ret i32 %r
}
define i37 @uadd_arg_int(half %x, i37 %y) {
; CHECK: intrinsic argument 1 type (matching overload type 0) expected i37, but got half
%r = call i37 @llvm.uadd.sat.i37(i37 %y, half %x)
ret i37 %r
}
define <4 x i32> @ssub_arg_int(<5 x i32> %x, <4 x i32> %y) {
; CHECK: intrinsic argument 0 type (matching overload type 0) expected <4 x i32>, but got <5 x i32>
%r = call <4 x i32> @llvm.ssub.sat.v4i32(<5 x i32> %x, <4 x i32> %y)
ret <4 x i32> %r
}
define <3 x i37> @usub_arg_int(<3 x i37> %x, <3 x i32> %y) {
; CHECK: intrinsic argument 1 type (matching overload type 0) expected <3 x i37>, but got <3 x i32>
%r = call <3 x i37> @llvm.usub.sat.v3i37(<3 x i37> %x, <3 x i32> %y)
ret <3 x i37> %r
}
define float @ushl_return_int(i32 %x, i32 %y) {
; CHECK: intrinsic return type (overload type 0) expected any integer or integer vector, but got float
%r = call float @llvm.ushl.sat.i32(i32 %x, i32 %y)
ret float %r
}
define <4 x float> @sshl_return_int_vec(<4 x i32> %x, <4 x i32> %y) {
; CHECK: intrinsic return type (overload type 0) expected any integer or integer vector, but got <4 x float>
%r = call <4 x float> @llvm.sshl.sat.v4i32(<4 x i32> %x, <4 x i32> %y)
ret <4 x float> %r
}
declare i32 @llvm.sadd.sat.i32(float, i32)
declare i37 @llvm.uadd.sat.i37(i37, half)
declare <4 x i32> @llvm.ssub.sat.v4i32(<5 x i32>, <4 x i32>)
declare <3 x i37> @llvm.usub.sat.v3i37(<3 x i37>, <3 x i32>)
declare float @llvm.ushl.sat.i32(i32, i32)
declare <4 x float> @llvm.sshl.sat.v4i32(<4 x i32>, <4 x i32>)