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
140 lines
4.5 KiB
LLVM
140 lines
4.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
|
|
|
|
define float @remquo_f32(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: store i32 -2, ptr [[QUO]], align 4
|
|
; CHECK-NEXT: ret float 1.000000e+00
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float -5.000000e+00, float 3.000000e+00, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_quo_sign(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_quo_sign(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: store i32 2, ptr [[QUO]], align 4
|
|
; CHECK-NEXT: ret float -1.000000e+00
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float 5.000000e+00, float 3.000000e+00, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_round(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_round(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: store i32 -6, ptr [[QUO]], align 4
|
|
; CHECK-NEXT: ret float f0xBE4CCCC8
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float -5.000000e+00, float 0x3FE99999A0000000, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define double @remquo_f64(ptr %quo) {
|
|
; CHECK-LABEL: define double @remquo_f64(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: store i32 -5, ptr [[QUO]], align 4
|
|
; CHECK-NEXT: ret double -0.000000e+00
|
|
;
|
|
entry:
|
|
%call = call double @remquo(double -5.000000e+00, double 1.000000e+00, ptr %quo)
|
|
ret double %call
|
|
}
|
|
|
|
; Negative tests
|
|
|
|
define float @remquo_f32_inf_x(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_inf_x(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float +inf, float 1.000000e+00, ptr [[QUO]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float 0x7FF0000000000000, float 1.000000e+00, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_zero_y(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_zero_y(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float -5.000000e+00, float 0.000000e+00, ptr [[QUO]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float -5.000000e+00, float 0.000000e+00, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_nzero_y(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_nzero_y(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float -5.000000e+00, float -0.000000e+00, ptr [[QUO]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float -5.000000e+00, float -0.000000e+00, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_nan_x(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_nan_x(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float +qnan, float 1.000000e+00, ptr [[QUO]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float 0x7FF8000000000000, float 1.000000e+00, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_nan_y(ptr %quo) {
|
|
; CHECK-LABEL: define float @remquo_f32_nan_y(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float 1.000000e+00, float +qnan, ptr [[QUO]])
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float 1.000000e+00, float 0x7FF8000000000000, ptr %quo)
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_strictfp(ptr %quo) strictfp {
|
|
; CHECK-LABEL: define float @remquo_f32_strictfp(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float -5.000000e+00, float 3.000000e+00, ptr [[QUO]]) #[[ATTR0]]
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float -5.000000e+00, float 3.000000e+00, ptr %quo) strictfp
|
|
ret float %call
|
|
}
|
|
|
|
define float @remquo_f32_zero_y_strictfp(ptr %quo) strictfp {
|
|
; CHECK-LABEL: define float @remquo_f32_zero_y_strictfp(
|
|
; CHECK-SAME: ptr [[QUO:%.*]]) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CALL:%.*]] = call float @remquof(float -5.000000e+00, float 0.000000e+00, ptr [[QUO]]) #[[ATTR0]]
|
|
; CHECK-NEXT: ret float [[CALL]]
|
|
;
|
|
entry:
|
|
%call = call float @remquof(float -5.000000e+00, float 0.000000e+00, ptr %quo) strictfp
|
|
ret float %call
|
|
}
|
|
|
|
declare float @remquof(float, float, ptr)
|
|
declare double @remquo(double, double, ptr)
|