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
93 lines
2.6 KiB
C
93 lines
2.6 KiB
C
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -target-cpu corei7-avx -emit-llvm %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -target-cpu corei7-avx -emit-llvm -x c++ %s -o - | FileCheck %s
|
|
|
|
typedef double vector8double __attribute__((__vector_size__(64)));
|
|
typedef float vector8float __attribute__((__vector_size__(32)));
|
|
typedef long vector8long __attribute__((__vector_size__(64)));
|
|
typedef short vector8short __attribute__((__vector_size__(16)));
|
|
typedef unsigned long vector8ulong __attribute__((__vector_size__(64)));
|
|
typedef unsigned short vector8ushort __attribute__((__vector_size__(16)));
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
vector8float flt_trunc(vector8double x) {
|
|
return __builtin_convertvector(x, vector8float);
|
|
// CHECK-LABEL: @flt_trunc
|
|
// CHECK: fptrunc <8 x double> %{{[^ ]}} to <8 x float>
|
|
}
|
|
|
|
vector8double flt_ext(vector8float x) {
|
|
return __builtin_convertvector(x, vector8double);
|
|
// CHECK-LABEL: @flt_ext
|
|
// CHECK: fpext <8 x float> %{{[^ ]}} to <8 x double>
|
|
}
|
|
|
|
vector8long flt_tosi(vector8float x) {
|
|
return __builtin_convertvector(x, vector8long);
|
|
// CHECK-LABEL: @flt_tosi
|
|
// CHECK: fptosi <8 x float> %{{[^ ]}} to <8 x i64>
|
|
}
|
|
|
|
vector8ulong flt_toui(vector8float x) {
|
|
return __builtin_convertvector(x, vector8ulong);
|
|
// CHECK-LABEL: @flt_toui
|
|
// CHECK: fptoui <8 x float> %{{[^ ]}} to <8 x i64>
|
|
}
|
|
|
|
vector8ulong fltd_toui(vector8double x) {
|
|
return __builtin_convertvector(x, vector8ulong);
|
|
// CHECK-LABEL: @fltd_toui
|
|
// CHECK: fptoui <8 x double> %{{[^ ]}} to <8 x i64>
|
|
}
|
|
|
|
vector8ulong int_zext(vector8ushort x) {
|
|
return __builtin_convertvector(x, vector8ulong);
|
|
// CHECK-LABEL: @int_zext
|
|
// CHECK: zext <8 x i16> %{{[^ ]}} to <8 x i64>
|
|
}
|
|
|
|
vector8long int_sext(vector8short x) {
|
|
return __builtin_convertvector(x, vector8long);
|
|
// CHECK-LABEL: @int_sext
|
|
// CHECK: sext <8 x i16> %{{[^ ]}} to <8 x i64>
|
|
}
|
|
|
|
vector8float int_tofp(vector8short x) {
|
|
return __builtin_convertvector(x, vector8float);
|
|
// CHECK-LABEL: @int_tofp
|
|
// CHECK: sitofp <8 x i16> %{{[^ ]}} to <8 x float>
|
|
}
|
|
|
|
vector8float uint_tofp(vector8ushort x) {
|
|
return __builtin_convertvector(x, vector8float);
|
|
// CHECK-LABEL: @uint_tofp
|
|
// CHECK: uitofp <8 x i16> %{{[^ ]}} to <8 x float>
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
template<typename T>
|
|
T int_toT(vector8long x) {
|
|
return __builtin_convertvector(x, T);
|
|
}
|
|
|
|
extern "C" {
|
|
vector8double int_toT_fp(vector8long x) {
|
|
// CHECK-LABEL: @int_toT_fp
|
|
// CHECK: sitofp <8 x i64> %{{[^ ]}} to <8 x double>
|
|
return int_toT<vector8double>(x);
|
|
}
|
|
}
|
|
#else
|
|
vector8double int_toT_fp(vector8long x) {
|
|
return __builtin_convertvector(x, vector8double);
|
|
}
|
|
#endif
|
|
|