Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/DCE/calls-errno.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

112 lines
4.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=dce -S | FileCheck %s
declare double @acos(double) nounwind willreturn
declare double @asin(double) nounwind willreturn
declare double @atan(double) nounwind willreturn
declare double @atan2(double, double) nounwind willreturn
declare double @ceil(double) nounwind willreturn
declare double @cos(double) nounwind willreturn
declare double @cosh(double) nounwind willreturn
declare double @exp(double) nounwind willreturn
declare double @exp2(double) nounwind willreturn
declare double @fabs(double) nounwind willreturn
declare double @floor(double) nounwind willreturn
declare double @fmod(double, double) nounwind willreturn
declare double @log(double) nounwind willreturn
declare double @log10(double) nounwind willreturn
declare double @pow(double, double) nounwind willreturn
declare double @sin(double) nounwind willreturn
declare double @sinh(double) nounwind willreturn
declare double @sqrt(double) nounwind willreturn
declare double @tan(double) nounwind willreturn
declare double @tanh(double) nounwind willreturn
declare float @acosf(float) nounwind willreturn
declare float @asinf(float) nounwind willreturn
declare float @atanf(float) nounwind willreturn
declare float @atan2f(float, float) nounwind willreturn
declare float @ceilf(float) nounwind willreturn
declare float @cosf(float) nounwind willreturn
declare float @coshf(float) nounwind willreturn
declare float @expf(float) nounwind willreturn
declare float @exp2f(float) nounwind willreturn
declare float @fabsf(float) nounwind willreturn
declare float @floorf(float) nounwind willreturn
declare float @fmodf(float, float) nounwind willreturn
declare float @logf(float) nounwind willreturn
declare float @log10f(float) nounwind willreturn willreturn
declare float @powf(float, float) nounwind willreturn
declare float @sinf(float) nounwind willreturn
declare float @sinhf(float) nounwind willreturn
declare float @sqrtf(float) nounwind willreturn
declare float @tanf(float) nounwind willreturn
declare float @tanhf(float) nounwind willreturn
define void @T() {
; CHECK-LABEL: @T(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[LOG1:%.*]] = call double @log(double 0.000000e+00)
; CHECK-NEXT: [[LOG2:%.*]] = call double @log(double -1.000000e+00)
; CHECK-NEXT: [[EXP2:%.*]] = call double @exp(double 1.000000e+03)
; CHECK-NEXT: [[COS2:%.*]] = call double @cos(double +inf)
; CHECK-NEXT: [[COS3:%.*]] = call double @cos(double 0.000000e+00) [[ATTR2:#.*]]
; CHECK-NEXT: [[FMOD2:%.*]] = call double @fmod(double +inf, double 1.000000e+00)
; CHECK-NEXT: ret void
;
entry:
; log(0) produces a pole error
%log1 = call double @log(double 0.000000e+00)
; log(-1) produces a domain error
%log2 = call double @log(double -1.000000e+00)
; log(1) is 0
%log3 = call double @log(double 1.000000e+00)
; exp(100) is roughly 2.6e+43
%exp1 = call double @exp(double 1.000000e+02)
; exp(1000) is a range error
%exp2 = call double @exp(double 1.000000e+03)
; cos(0) is 1
%cos1 = call double @cos(double 0.000000e+00)
; cos(inf) is a domain error
%cos2 = call double @cos(double 0x7FF0000000000000)
; cos(0) nobuiltin may have side effects
%cos3 = call double @cos(double 0.000000e+00) nobuiltin
; pow(0, 1) is 0
%pow1 = call double @pow(double 0x7FF0000000000000, double 1.000000e+00)
; pow(0, -1) is a pole error
; FIXME: It fails on mingw host. Suppress checking.
; %pow2 = call double @pow(double 0.000000e+00, double -1.000000e+00)
; fmod(inf, nan) is nan
%fmod1 = call double @fmod(double 0x7FF0000000000000, double 0x7FF0000000000001)
; fmod(inf, 1) is a domain error
%fmod2 = call double @fmod(double 0x7FF0000000000000, double 1.000000e+00)
ret void
}
define void @Tstrict() strictfp {
; CHECK-LABEL: @Tstrict(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[COS4:%.*]] = call double @cos(double 1.000000e+00) [[ATTR1:#.*]]
; CHECK-NEXT: ret void
;
entry:
; cos(1) strictfp sets FP status flags
%cos4 = call double @cos(double 1.000000e+00) strictfp
ret void
}