Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/soft-sitofp.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

170 lines
3.3 KiB
LLVM

; RUN: llc -mtriple=i386-pc-linux < %s | FileCheck %s
; RUN: llc -mtriple=x86_64-pc-linux < %s | FileCheck %s
; Function Attrs: nounwind
; CHECK-LABEL: s64_to_d:
; CHECK: call{{l|q}} __floatdidf
define double @s64_to_d(i64 %n) #0 {
entry:
%conv = sitofp i64 %n to double
ret double %conv
}
; CHECK-LABEL: s64_to_f:
; CHECK: call{{l|q}} __floatdisf
define float @s64_to_f(i64 %n) #0 {
entry:
%conv = sitofp i64 %n to float
ret float %conv
}
; CHECK-LABEL: s32_to_d:
; CHECK: call{{l|q}} __floatsidf
define double @s32_to_d(i32 %n) #0 {
entry:
%conv = sitofp i32 %n to double
ret double %conv
}
; CHECK-LABEL: s32_to_f:
; CHECK: call{{l|q}} __floatsisf
define float @s32_to_f(i32 %n) #0 {
entry:
%conv = sitofp i32 %n to float
ret float %conv
}
; CHECK-LABEL: u64_to_d:
; CHECK: call{{l|q}} __floatundidf
define double @u64_to_d(i64 %n) #0 {
entry:
%conv = uitofp i64 %n to double
ret double %conv
}
; CHECK-LABEL: u64_to_f:
; CHECK: call{{l|q}} __floatundisf
define float @u64_to_f(i64 %n) #0 {
entry:
%conv = uitofp i64 %n to float
ret float %conv
}
; CHECK-LABEL: u32_to_d:
; CHECK: call{{l|q}} __floatunsidf
define double @u32_to_d(i32 %n) #0 {
entry:
%conv = uitofp i32 %n to double
ret double %conv
}
; CHECK-LABEL: u32_to_f:
; CHECK: call{{l|q}} __floatunsisf
define float @u32_to_f(i32 %n) #0 {
entry:
%conv = uitofp i32 %n to float
ret float %conv
}
; CHECK-LABEL: d_to_s64:
; CHECK: call{{l|q}} __fixdfdi
define i64 @d_to_s64(double %n) #0 {
entry:
%conv = fptosi double %n to i64
ret i64 %conv
}
; CHECK-LABEL: d_to_s32:
; CHECK: call{{l|q}} __fixdfsi
define i32 @d_to_s32(double %n) #0 {
entry:
%conv = fptosi double %n to i32
ret i32 %conv
}
; CHECK-LABEL: f_to_s64:
; CHECK: call{{l|q}} __fixsfdi
define i64 @f_to_s64(float %n) #0 {
entry:
%conv = fptosi float %n to i64
ret i64 %conv
}
; CHECK-LABEL: f_to_s32:
; CHECK: call{{l|q}} __fixsfsi
define i32 @f_to_s32(float %n) #0 {
entry:
%conv = fptosi float %n to i32
ret i32 %conv
}
; CHECK-LABEL: d_to_u64:
; CHECK: call{{l|q}} __fixunsdfdi
define i64 @d_to_u64(double %n) #0 {
entry:
%conv = fptoui double %n to i64
ret i64 %conv
}
; CHECK-LABEL: d_to_u32:
; CHECK: call{{l|q}} __fixunsdfsi
define i32 @d_to_u32(double %n) #0 {
entry:
%conv = fptoui double %n to i32
ret i32 %conv
}
; CHECK-LABEL: f_to_u64:
; CHECK: call{{l|q}} __fixunssfdi
define i64 @f_to_u64(float %n) #0 {
entry:
%conv = fptoui float %n to i64
ret i64 %conv
}
; CHECK-LABEL: f_to_u32:
; CHECK: call{{l|q}} __fixunssfsi
define i32 @f_to_u32(float %n) #0 {
entry:
%conv = fptoui float %n to i32
ret i32 %conv
}
; CHECK-LABEL: f_to_s8:
; CHECK: call{{l|q}} __fixsfsi
define i8 @f_to_s8(float %f, i8 %i) #0 {
entry:
%conv = fptosi float %f to i8
%add = add i8 %conv, %i
ret i8 %add
}
; CHECK-LABEL: f_to_u8:
; CHECK: call{{l|q}} __fixunssfsi
define i8 @f_to_u8(float %f, i8 %i) #0 {
entry:
%conv = fptoui float %f to i8
%add = add i8 %conv, %i
ret i8 %add
}
; CHECK-LABEL: f_to_s16:
; CHECK: call{{l|q}} __fixsfsi
define i16 @f_to_s16(float %f, i16 %i) #0 {
entry:
%conv = fptosi float %f to i16
%add = add i16 %conv, %i
ret i16 %add
}
; CHECK-LABEL: f_to_u16:
; CHECK: call{{l|q}} __fixunssfsi
define i16 @f_to_u16(float %f, i16 %i) #0 {
entry:
%conv = fptoui float %f to i16
%add = add i16 %conv, %i
ret i16 %add
}
attributes #0 = { nounwind "use-soft-float"="true" }