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
228 lines
6.6 KiB
LLVM
228 lines
6.6 KiB
LLVM
; RUN: llc < %s -mtriple=thumbv7-none-eabi -mcpu=cortex-m3 | FileCheck %s -check-prefix=CHECK -check-prefix=SOFT -check-prefix=NONE
|
|
; RUN: llc < %s -mtriple=thumbv7-none-eabihf -mcpu=cortex-m4 | FileCheck %s -check-prefix=CHECK -check-prefix=SOFT -check-prefix=SP
|
|
; RUN: llc < %s -mtriple=thumbv7-none-eabihf -mcpu=cortex-m7 | FileCheck %s -check-prefix=CHECK -check-prefix=HARD -check-prefix=DP -check-prefix=VFP -check-prefix=FP-ARMv8
|
|
; RUN: llc < %s -mtriple=thumbv7-none-eabihf -mcpu=cortex-m7 -mattr=-fp64 | FileCheck %s -check-prefix=CHECK -check-prefix=SOFT -check-prefix=SP
|
|
; RUN: llc < %s -mtriple=thumbv7-none-eabihf -mcpu=cortex-a7 | FileCheck %s -check-prefix=CHECK -check-prefix=HARD -check-prefix=DP -check-prefix=NEON -check-prefix=VFP4
|
|
; RUN: llc < %s -mtriple=thumbv7-none-eabihf -mcpu=cortex-a57 | FileCheck %s -check-prefix=CHECK -check-prefix=HARD -check-prefix=DP -check-prefix=NEON -check-prefix=FP-ARMv8
|
|
|
|
declare double @llvm.sqrt.f64(double %Val)
|
|
define double @sqrt_d(double %a) {
|
|
; CHECK-LABEL: sqrt_d:
|
|
; SOFT: {{(bl|b)}} sqrt
|
|
; HARD: vsqrt.f64 d0, d0
|
|
%1 = call double @llvm.sqrt.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.powi.f64.i32(double %Val, i32 %power)
|
|
define double @powi_d(double %a, i32 %b) {
|
|
; CHECK-LABEL: powi_d:
|
|
; SOFT: {{(bl|b)}} __powidf2
|
|
; HARD: b __powidf2
|
|
%1 = call double @llvm.powi.f64.i32(double %a, i32 %b)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.sin.f64(double %Val)
|
|
define double @sin_d(double %a) {
|
|
; CHECK-LABEL: sin_d:
|
|
; SOFT: {{(bl|b)}} sin
|
|
; HARD: b sin
|
|
%1 = call double @llvm.sin.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.cos.f64(double %Val)
|
|
define double @cos_d(double %a) {
|
|
; CHECK-LABEL: cos_d:
|
|
; SOFT: {{(bl|b)}} cos
|
|
; HARD: b cos
|
|
%1 = call double @llvm.cos.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.tan.f64(double %Val)
|
|
define double @tan_d(double %a) {
|
|
; CHECK-LABEL: tan_d:
|
|
; SOFT: {{(bl|b)}} tan
|
|
; HARD: b tan
|
|
%1 = call double @llvm.tan.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.pow.f64(double %Val, double %power)
|
|
define double @pow_d(double %a, double %b) {
|
|
; CHECK-LABEL: pow_d:
|
|
; SOFT: {{(bl|b)}} pow
|
|
; HARD: b pow
|
|
%1 = call double @llvm.pow.f64(double %a, double %b)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.exp.f64(double %Val)
|
|
define double @exp_d(double %a) {
|
|
; CHECK-LABEL: exp_d:
|
|
; SOFT: {{(bl|b)}} exp
|
|
; HARD: b exp
|
|
%1 = call double @llvm.exp.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.exp2.f64(double %Val)
|
|
define double @exp2_d(double %a) {
|
|
; CHECK-LABEL: exp2_d:
|
|
; SOFT: {{(bl|b)}} exp2
|
|
; HARD: b exp2
|
|
%1 = call double @llvm.exp2.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.log.f64(double %Val)
|
|
define double @log_d(double %a) {
|
|
; CHECK-LABEL: log_d:
|
|
; SOFT: {{(bl|b)}} log
|
|
; HARD: b log
|
|
%1 = call double @llvm.log.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.log10.f64(double %Val)
|
|
define double @log10_d(double %a) {
|
|
; CHECK-LABEL: log10_d:
|
|
; SOFT: {{(bl|b)}} log10
|
|
; HARD: b log10
|
|
%1 = call double @llvm.log10.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.log2.f64(double %Val)
|
|
define double @log2_d(double %a) {
|
|
; CHECK-LABEL: log2_d:
|
|
; SOFT: {{(bl|b)}} log2
|
|
; HARD: b log2
|
|
%1 = call double @llvm.log2.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.fma.f64(double %a, double %b, double %c)
|
|
define double @fma_d(double %a, double %b, double %c) {
|
|
; CHECK-LABEL: fma_d:
|
|
; SOFT: {{(bl|b)}} fma
|
|
; HARD: vfma.f64
|
|
%1 = call double @llvm.fma.f64(double %a, double %b, double %c)
|
|
ret double %1
|
|
}
|
|
|
|
; FIXME: the FPv4-SP version is less efficient than the no-FPU version
|
|
declare double @llvm.fabs.f64(double %Val)
|
|
define double @abs_d(double %a) {
|
|
; CHECK-LABEL: abs_d:
|
|
; NONE: bic r1, r1, #-2147483648
|
|
; SP: vldr [[D1:d[0-9]+]], .LCPI{{.*}}
|
|
; SP-DAG: vmov [[R2:r[0-9]+]], [[R3:r[0-9]+]], [[D1]]
|
|
; SP-DAG: vmov [[R0:r[0-9]+]], [[R1:r[0-9]+]], [[D0:d[0-9]+]]
|
|
; SP: lsrs [[R4:r[0-9]+]], [[R3]], #31
|
|
; SP: bfi [[R5:r[0-9]+]], [[R4]], #31, #1
|
|
; SP: vmov [[D0]], [[R0]], [[R5]]
|
|
; DP: vabs.f64 d0, d0
|
|
%1 = call double @llvm.fabs.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.copysign.f64(double %Mag, double %Sgn)
|
|
define double @copysign_d(double %a, double %b) {
|
|
; CHECK-LABEL: copysign_d:
|
|
; SOFT: lsrs [[REG:r[0-9]+]], {{r[0-9]+}}, #31
|
|
; SOFT: bfi {{r[0-9]+}}, [[REG]], #31, #1
|
|
; VFP: lsrs [[REG:r[0-9]+]], {{r[0-9]+}}, #31
|
|
; VFP: bfi {{r[0-9]+}}, [[REG]], #31, #1
|
|
; NEON: vmov.i32 d16, #0x80000000
|
|
; NEON-NEXT: vshl.i64 d16, d16, #32
|
|
; NEON-NEXT: vbit d0, d1, d16
|
|
; NEON-NEXT: bx lr
|
|
%1 = call double @llvm.copysign.f64(double %a, double %b)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.floor.f64(double %Val)
|
|
define double @floor_d(double %a) {
|
|
; CHECK-LABEL: floor_d:
|
|
; SOFT: {{(bl|b)}} floor
|
|
; VFP4: b floor
|
|
; FP-ARMv8: vrintm.f64
|
|
%1 = call double @llvm.floor.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.ceil.f64(double %Val)
|
|
define double @ceil_d(double %a) {
|
|
; CHECK-LABEL: ceil_d:
|
|
; SOFT: {{(bl|b)}} ceil
|
|
; VFP4: b ceil
|
|
; FP-ARMv8: vrintp.f64
|
|
%1 = call double @llvm.ceil.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.trunc.f64(double %Val)
|
|
define double @trunc_d(double %a) {
|
|
; CHECK-LABEL: trunc_d:
|
|
; SOFT: {{(bl|b)}} trunc
|
|
; FFP4: b trunc
|
|
; FP-ARMv8: vrintz.f64
|
|
%1 = call double @llvm.trunc.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.rint.f64(double %Val)
|
|
define double @rint_d(double %a) {
|
|
; CHECK-LABEL: rint_d:
|
|
; SOFT: {{(bl|b)}} rint
|
|
; VFP4: b rint
|
|
; FP-ARMv8: vrintx.f64
|
|
%1 = call double @llvm.rint.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.nearbyint.f64(double %Val)
|
|
define double @nearbyint_d(double %a) {
|
|
; CHECK-LABEL: nearbyint_d:
|
|
; SOFT: {{(bl|b)}} nearbyint
|
|
; VFP4: b nearbyint
|
|
; FP-ARMv8: vrintr.f64
|
|
%1 = call double @llvm.nearbyint.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.round.f64(double %Val)
|
|
define double @round_d(double %a) {
|
|
; CHECK-LABEL: round_d:
|
|
; SOFT: {{(bl|b)}} round
|
|
; VFP4: b round
|
|
; FP-ARMv8: vrinta.f64
|
|
%1 = call double @llvm.round.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.roundeven.f64(double %Val)
|
|
define double @roundeven_d(double %a) {
|
|
; CHECK-LABEL: roundeven_d:
|
|
; SOFT: {{(bl|b)}} roundeven
|
|
; VFP4: b roundeven
|
|
; FP-ARMv8: vrintn.f64
|
|
%1 = call double @llvm.roundeven.f64(double %a)
|
|
ret double %1
|
|
}
|
|
|
|
declare double @llvm.fmuladd.f64(double %a, double %b, double %c)
|
|
define double @fmuladd_d(double %a, double %b, double %c) {
|
|
; CHECK-LABEL: fmuladd_d:
|
|
; SOFT: bl __aeabi_dmul
|
|
; SOFT: bl __aeabi_dadd
|
|
; VFP4: vmul.f64
|
|
; VFP4: vadd.f64
|
|
; FP-ARMv8: vfma.f64
|
|
%1 = call double @llvm.fmuladd.f64(double %a, double %b, double %c)
|
|
ret double %1
|
|
}
|