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
67 lines
2.1 KiB
LLVM
67 lines
2.1 KiB
LLVM
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
|
|
|
|
declare float @llvm.fma.f32(float, float, float) #0
|
|
declare float @llvm.fmuladd.f32(float, float, float) #0
|
|
declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>) #0
|
|
|
|
declare double @llvm.fma.f64(double, double, double) #0
|
|
declare double @llvm.fmuladd.f64(double, double, double) #0
|
|
|
|
declare double @llvm.sqrt.f64(double) #0
|
|
|
|
|
|
; CHECK-LABEL: @constant_fold_fma_f32
|
|
; CHECK-NEXT: ret float 6.000000e+00
|
|
define float @constant_fold_fma_f32() #0 {
|
|
%x = call float @llvm.fma.f32(float 1.0, float 2.0, float 4.0) #0
|
|
ret float %x
|
|
}
|
|
|
|
; CHECK-LABEL: @constant_fold_fma_v4f32
|
|
; CHECK-NEXT: ret <4 x float> <float 1.200000e+01, float 1.400000e+01, float 1.600000e+01, float 1.800000e+01>
|
|
define <4 x float> @constant_fold_fma_v4f32() #0 {
|
|
%x = call <4 x float> @llvm.fma.v4f32(<4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float> <float 2.0, float 2.0, float 2.0, float 2.0>, <4 x float> <float 10.0, float 10.0, float 10.0, float 10.0>)
|
|
ret <4 x float> %x
|
|
}
|
|
|
|
; CHECK-LABEL: @constant_fold_fmuladd_f32
|
|
; CHECK-NEXT: ret float 6.000000e+00
|
|
define float @constant_fold_fmuladd_f32() #0 {
|
|
%x = call float @llvm.fmuladd.f32(float 1.0, float 2.0, float 4.0) #0
|
|
ret float %x
|
|
}
|
|
|
|
; CHECK-LABEL: @constant_fold_fma_f64
|
|
; CHECK-NEXT: ret double 6.000000e+00
|
|
define double @constant_fold_fma_f64() #0 {
|
|
%x = call double @llvm.fma.f64(double 1.0, double 2.0, double 4.0) #0
|
|
ret double %x
|
|
}
|
|
|
|
; CHECK-LABEL: @constant_fold_fmuladd_f64
|
|
; CHECK-NEXT: ret double 6.000000e+00
|
|
define double @constant_fold_fmuladd_f64() #0 {
|
|
%x = call double @llvm.fmuladd.f64(double 1.0, double 2.0, double 4.0) #0
|
|
ret double %x
|
|
}
|
|
|
|
; PR32177
|
|
|
|
; CHECK-LABEL: @constant_fold_frem_f32
|
|
; CHECK-NEXT: ret float f0x4D30D900
|
|
define float @constant_fold_frem_f32() #0 {
|
|
%x = frem float 0x43cbfcd960000000, 0xc1e2b34a00000000
|
|
ret float %x
|
|
}
|
|
|
|
; PR3316
|
|
|
|
; CHECK-LABEL: @constant_fold_frem_f64
|
|
; CHECK-NEXT: ret double 0.000000e+00
|
|
define double @constant_fold_frem_f64() {
|
|
%x = frem double 0x43E0000000000000, 1.000000e+00
|
|
ret double %x
|
|
}
|
|
|
|
attributes #0 = { nounwind readnone }
|