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
80 lines
2.4 KiB
C++
80 lines
2.4 KiB
C++
// RUN: %clang_cc1 -fexperimental-strict-floating-point -DEXCEPT=1 \
|
|
// RUN: -fcxx-exceptions -triple x86_64-linux-gnu -emit-llvm -o - %s \
|
|
// RUN: | FileCheck -check-prefix=CHECK-SRC %s
|
|
|
|
// RUN: %clang_cc1 -fexperimental-strict-floating-point \
|
|
// RUN: -triple x86_64-linux-gnu -emit-llvm -o - %s -ffp-eval-method=source \
|
|
// RUN: | FileCheck -check-prefix=CHECK-SRC %s
|
|
|
|
// RUN: %clang_cc1 -fexperimental-strict-floating-point \
|
|
// RUN: -triple x86_64-linux-gnu -emit-llvm -o - %s -ffp-eval-method=double \
|
|
// RUN: | FileCheck -check-prefixes=CHECK-DBL %s
|
|
|
|
// RUN: %clang_cc1 -fexperimental-strict-floating-point \
|
|
// RUN: -triple x86_64-linux-gnu -emit-llvm -o - %s -ffp-eval-method=extended \
|
|
// RUN: | FileCheck -check-prefixes=CHECK-EXT-FLT %s
|
|
|
|
// RUN: %clang_cc1 -triple powerpc-unknown-aix -emit-llvm -o - %s \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-DBL-PPC
|
|
|
|
// RUN: %clang_cc1 -fexperimental-strict-floating-point -triple i386-linux-gnu \
|
|
// RUN: -emit-llvm -o - %s -ffp-eval-method=extended -mlong-double-80 \
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-EXT-FLT
|
|
|
|
int getFEM() {
|
|
// LABEL: define {{.*}}getFEM{{.*}}
|
|
return __FLT_EVAL_METHOD__;
|
|
// CHECK-SRC: ret {{.*}} 0
|
|
// CHECK-DBL: ret {{.*}} 1
|
|
// CHECK-DBL-PPC: ret {{.*}} 1
|
|
// CHECK-EXT-FLT: ret {{.*}} 2
|
|
}
|
|
|
|
float func() {
|
|
// LABEL: define {{.*}}@_Z4func{{.*}}
|
|
float X = 100.0f;
|
|
float Y = -45.3f;
|
|
float Z = 393.78f;
|
|
float temp;
|
|
#if __FLT_EVAL_METHOD__ == 0
|
|
temp = X + Y + Z;
|
|
#elif __FLT_EVAL_METHOD__ == 1
|
|
temp = X * Y * Z;
|
|
#elif __FLT_EVAL_METHOD__ == 2
|
|
temp = X * Y - Z;
|
|
#endif
|
|
// CHECK-SRC: load float, ptr
|
|
// CHECK-SRC: load float, ptr
|
|
// CHECK-SRC: fadd float
|
|
// CHECK-SRC: load float, ptr
|
|
// CHECK-SRC: fadd float
|
|
|
|
// CHECK-DBL: load float, ptr
|
|
// CHECK-DBL: fpext float
|
|
// CHECK-DBL: load float, ptr
|
|
// CHECK-DBL: fpext float
|
|
// CHECK-DBL: fmul double
|
|
// CHECK-DBL: load float, ptr
|
|
// CHECK-DBL: fpext float
|
|
// CHECK-DBL: fmul double
|
|
// CHECK-DBL: fptrunc double
|
|
|
|
// CHECK-EXT-FLT: load float, ptr
|
|
// CHECK-EXT-FLT: fpext float
|
|
// CHECK-EXT-FLT: load float, ptr
|
|
// CHECK-EXT-FLT: fpext float
|
|
// CHECK-EXT-FLT: fmul x86_fp80
|
|
// CHECK-EXT-FLT: load float, ptr
|
|
// CHECK-EXT-FLT: fpext float
|
|
// CHECK-EXT-FLT: fsub x86_fp80
|
|
// CHECK-EXT-FLT: fptrunc x86_fp80
|
|
|
|
// CHECK-DBL-PPC: load float, ptr
|
|
// CHECK-DBL-PPC: load float, ptr
|
|
// CHECK-DBL-PPC: fmul float
|
|
// CHECK-DBL-PPC: load float, ptr
|
|
// CHECK-DBL-PPC: fmul float
|
|
|
|
return temp;
|
|
}
|