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
70 lines
3.3 KiB
C
70 lines
3.3 KiB
C
// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
|
|
// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
|
|
// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
|
|
|
|
#include <immintrin.h>
|
|
|
|
double test_mm512_reduce_max_pd(__m512d __W, double ExtraAddOp){
|
|
// CIR-LABEL: _mm512_reduce_max_pd
|
|
// CIR: cir.call_llvm_intrinsic "vector.reduce.fmax" %[[V:.*]] : (!cir.vector<8 x !cir.double>{{.*}}) -> !cir.double
|
|
|
|
// CIR-LABEL: test_mm512_reduce_max_pd
|
|
// CIR: cir.call @_mm512_reduce_max_pd(%[[VEC:.*]]) {nobuiltin, nobuiltins = [{{.*}}]} : (!cir.vector<8 x !cir.double>{{.*}}) -> !cir.double
|
|
|
|
// LLVM-LABEL: test_mm512_reduce_max_pd
|
|
// LLVM: call double @llvm.vector.reduce.fmax.v8f64(<8 x double> %{{.*}})
|
|
|
|
// OGCG-LABEL: test_mm512_reduce_max_pd
|
|
// OGCG-NOT: nnan
|
|
// OGCG: call nnan {{.*}}double @llvm.vector.reduce.fmax.v8f64(<8 x double> %{{.*}})
|
|
// OGCG-NOT: nnan
|
|
return _mm512_reduce_max_pd(__W) + ExtraAddOp;
|
|
}
|
|
|
|
double test_mm512_reduce_min_pd(__m512d __W, double ExtraMulOp){
|
|
// CIR-LABEL: _mm512_reduce_min_pd
|
|
// CIR: cir.call_llvm_intrinsic "vector.reduce.fmin" %[[V:.*]] : (!cir.vector<8 x !cir.double>{{.*}}) -> !cir.double
|
|
|
|
// CIR-LABEL: test_mm512_reduce_min_pd
|
|
// CIR: cir.call @_mm512_reduce_min_pd(%[[VEC:.*]]) {nobuiltin, nobuiltins = [{{.*}}]} : (!cir.vector<8 x !cir.double>{{.*}}) -> !cir.double
|
|
|
|
// LLVM-LABEL: test_mm512_reduce_min_pd
|
|
// LLVM: call double @llvm.vector.reduce.fmin.v8f64(<8 x double> %{{.*}})
|
|
|
|
// OGCG-LABEL: test_mm512_reduce_min_pd
|
|
// OGCG-NOT: nnan
|
|
// OGCG: call nnan {{.*}}double @llvm.vector.reduce.fmin.v8f64(<8 x double> %{{.*}})
|
|
// OGCG-NOT: nnan
|
|
return _mm512_reduce_min_pd(__W) * ExtraMulOp;
|
|
}
|
|
|
|
float test_mm512_reduce_max_ps(__m512 __W){
|
|
// CIR-LABEL: _mm512_reduce_max_ps
|
|
// CIR: cir.call_llvm_intrinsic "vector.reduce.fmax" %[[V:.*]] : (!cir.vector<16 x !cir.float>{{.*}}) -> !cir.float
|
|
|
|
// CIR-LABEL: test_mm512_reduce_max_ps
|
|
// CIR: cir.call @_mm512_reduce_max_ps(%[[VEC:.*]]) {nobuiltin, nobuiltins = [{{.*}}]} : (!cir.vector<16 x !cir.float>{{.*}}) -> !cir.float
|
|
|
|
// LLVM-LABEL: test_mm512_reduce_max_ps
|
|
// LLVM: call float @llvm.vector.reduce.fmax.v16f32(<16 x float> %{{.*}})
|
|
|
|
// OGCG-LABEL: test_mm512_reduce_max_ps
|
|
// OGCG: call nnan {{.*}}float @llvm.vector.reduce.fmax.v16f32(<16 x float> %{{.*}})
|
|
return _mm512_reduce_max_ps(__W);
|
|
}
|
|
|
|
float test_mm512_reduce_min_ps(__m512 __W){
|
|
// CIR-LABEL: _mm512_reduce_min_ps
|
|
// CIR: cir.call_llvm_intrinsic "vector.reduce.fmin" %[[V:.*]] : (!cir.vector<16 x !cir.float>{{.*}}) -> !cir.float
|
|
|
|
// CIR-LABEL: test_mm512_reduce_min_ps
|
|
// CIR: cir.call @_mm512_reduce_min_ps(%[[VEC:.*]]) {nobuiltin, nobuiltins = [{{.*}}]} : (!cir.vector<16 x !cir.float>{{.*}}) -> !cir.float
|
|
|
|
// LLVM-LABEL: test_mm512_reduce_min_ps
|
|
// LLVM: call float @llvm.vector.reduce.fmin.v16f32(<16 x float> %{{.*}})
|
|
|
|
// OGCG-LABEL: test_mm512_reduce_min_ps
|
|
// OGCG: call nnan {{.*}}float @llvm.vector.reduce.fmin.v16f32(<16 x float> %{{.*}})
|
|
return _mm512_reduce_min_ps(__W);
|
|
}
|