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
64 lines
3.1 KiB
C
64 lines
3.1 KiB
C
// REQUIRES: powerpc-registered-target
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +isa-v207-instructions -target-feature +power8-vector \
|
|
// RUN: -triple powerpc64-unknown-linux-gnu -emit-llvm %s -o - \
|
|
// RUN: -D__XL_COMPAT_ALTIVEC__ -target-cpu pwr7 | FileCheck %s
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -D__XL_COMPAT_ALTIVEC__ \
|
|
// RUN: -target-cpu pwr8 -triple powerpc64le-unknown-linux-gnu \
|
|
// RUN: -emit-llvm %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -U__XL_COMPAT_ALTIVEC__ \
|
|
// RUN: -target-cpu pwr8 -triple powerpc64le-unknown-linux-gnu \
|
|
// RUN: -emit-llvm %s -o - | FileCheck --check-prefix=NOCOMPAT %s
|
|
|
|
#include <altivec.h>
|
|
vector double vd = { 3.4e22, 1.8e-3 };
|
|
vector signed long long res_vsll, vsll = { -12345678999ll, 12345678999 };
|
|
vector unsigned long long res_vull, vull = { 11547229456923630743llu, 18014402265226391llu };
|
|
vector float res_vf;
|
|
vector double res_vd;
|
|
vector signed int res_vsi;
|
|
vector unsigned int res_vui;
|
|
|
|
void test() {
|
|
// CHECK-LABEL: @test(
|
|
// CHECK-NEXT: entry:
|
|
// NOCOMPAT-LABEL: @test(
|
|
// NOCOMPAT-NEXT: entry:
|
|
|
|
res_vf = vec_ctf(vsll, 4);
|
|
// CHECK: [[TMP0:%.*]] = load <2 x i64>, ptr @vsll, align 16
|
|
// CHECK-NEXT: [[TMP1:%.*]] = call <4 x float> @llvm.ppc.vsx.xvcvsxdsp(<2 x i64> [[TMP0]])
|
|
// CHECK-NEXT: fmul <4 x float> [[TMP1]], splat (float 6.250000e-02)
|
|
// NOCOMPAT: [[TMP0:%.*]] = load <2 x i64>, ptr @vsll, align 16
|
|
// NOCOMPAT-NEXT: [[CONV:%.*]] = sitofp <2 x i64> [[TMP0]] to <2 x double>
|
|
// NOCOMPAT-NEXT: fmul <2 x double> [[CONV]], splat (double 6.250000e-02)
|
|
|
|
res_vf = vec_ctf(vull, 4);
|
|
// CHECK: [[TMP2:%.*]] = load <2 x i64>, ptr @vull, align 16
|
|
// CHECK-NEXT: [[TMP3:%.*]] = call <4 x float> @llvm.ppc.vsx.xvcvuxdsp(<2 x i64> [[TMP2]])
|
|
// CHECK-NEXT: fmul <4 x float> [[TMP3]], splat (float 6.250000e-02)
|
|
// NOCOMPAT: [[TMP2:%.*]] = load <2 x i64>, ptr @vull, align 16
|
|
// NOCOMPAT-NEXT: [[CONV1:%.*]] = uitofp <2 x i64> [[TMP2]] to <2 x double>
|
|
// NOCOMPAT-NEXT: fmul <2 x double> [[CONV1]], splat (double 6.250000e-02)
|
|
|
|
res_vsll = vec_cts(vd, 4);
|
|
// CHECK: [[TMP4:%.*]] = load <2 x double>, ptr @vd, align 16
|
|
// CHECK-NEXT: fmul <2 x double> [[TMP4]], splat (double 1.600000e+01)
|
|
// CHECK: call <4 x i32> @llvm.ppc.vsx.xvcvdpsxws(<2 x double>
|
|
// NOCOMPAT: [[TMP4:%.*]] = load <2 x double>, ptr @vd, align 16
|
|
// NOCOMPAT-NEXT: fmul <2 x double> [[TMP4]], splat (double 1.600000e+01)
|
|
|
|
res_vull = vec_ctu(vd, 4);
|
|
// CHECK: [[TMP8:%.*]] = load <2 x double>, ptr @vd, align 16
|
|
// CHECK-NEXT: fmul <2 x double> [[TMP8]], splat (double 1.600000e+01)
|
|
// CHECK: call <4 x i32> @llvm.ppc.vsx.xvcvdpuxws(<2 x double>
|
|
// NOCOMPAT: [[TMP7:%.*]] = load <2 x double>, ptr @vd, align 16
|
|
// NOCOMPAT-NEXT: fmul <2 x double> [[TMP7]], splat (double 1.600000e+01)
|
|
|
|
res_vd = vec_round(vd);
|
|
// CHECK: call double @llvm.ppc.readflm()
|
|
// CHECK: call double @llvm.ppc.setrnd(i32 0)
|
|
// CHECK: call <2 x double> @llvm.rint.v2f64(<2 x double>
|
|
// CHECK: call double @llvm.ppc.setflm(double
|
|
// NOCOMPAT: call <2 x double> @llvm.round.v2f64(<2 x double>
|
|
}
|