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
98 lines
5.0 KiB
C
98 lines
5.0 KiB
C
// REQUIRES: powerpc-registered-target
|
|
|
|
// RUN: %clang_cc1 -target-feature +power9-vector -target-feature +isa-v207-instructions \
|
|
// RUN: -triple powerpc64-unknown-unknown -fsyntax-only \
|
|
// RUN: -flax-vector-conversions=integer \
|
|
// RUN: -Wall -Werror -verify %s
|
|
|
|
// RUN: %clang_cc1 -target-feature +power9-vector -target-feature +isa-v207-instructions \
|
|
// RUN: -triple powerpc64le-unknown-unknown -fsyntax-only \
|
|
// RUN: -flax-vector-conversions=integer \
|
|
// RUN: -Wall -Werror -verify %s
|
|
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +power9-vector -target-feature +isa-v207-instructions \
|
|
// RUN: -triple powerpc64-unknown-unknown -fsyntax-only \
|
|
// RUN: -Wall -Werror -verify %s
|
|
|
|
#include <altivec.h>
|
|
|
|
extern vector signed int vsi;
|
|
extern vector unsigned int vui;
|
|
extern vector float vf;
|
|
extern vector unsigned char vuc;
|
|
extern vector signed __int128 vsllli;
|
|
|
|
void testInsertWord(void) {
|
|
int index = 5;
|
|
vector unsigned char v1 = vec_insert4b(vui, vuc, index); // expected-error {{argument to '__builtin_vsx_insertword' must be a constant integer}}
|
|
vector unsigned long long v2 = vec_extract4b(vuc, index); // expected-error {{argument to '__builtin_vsx_extractuword' must be a constant integer}}
|
|
}
|
|
|
|
void testXXPERMDI(int index) {
|
|
vec_xxpermdi(vsi); //expected-error {{too few arguments to function call, expected 3, have 1}}
|
|
vec_xxpermdi(vsi, vsi, 2, 4); //expected-error {{too many arguments to function call, expected 3, have 4}}
|
|
vec_xxpermdi(vsi, vsi, index); //expected-error {{argument 3 to '__builtin_vsx_xxpermdi' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)}}
|
|
vec_xxpermdi(1, 2, 3); //expected-error {{first two arguments to '__builtin_vsx_xxpermdi' must be vectors}}
|
|
vec_xxpermdi(vsi, vuc, 2); //expected-error {{first two arguments to '__builtin_vsx_xxpermdi' must have the same type}}
|
|
}
|
|
|
|
void testXXSLDWI(int index) {
|
|
vec_xxsldwi(vsi); //expected-error {{too few arguments to function call, expected 3, have 1}}
|
|
vec_xxsldwi(vsi, vsi, 2, 4); //expected-error {{too many arguments to function call, expected 3, have 4}}
|
|
vec_xxsldwi(vsi, vsi, index); //expected-error {{argument 3 to '__builtin_vsx_xxsldwi' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)}}
|
|
vec_xxsldwi(1, 2, 3); //expected-error {{first two arguments to '__builtin_vsx_xxsldwi' must be vectors}}
|
|
vec_xxsldwi(vsi, vuc, 2); //expected-error {{first two arguments to '__builtin_vsx_xxsldwi' must have the same type}}
|
|
}
|
|
|
|
void testCTF(int index) {
|
|
vec_ctf(vsi, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}} expected-error {{argument to '__builtin_altivec_vcfux' must be a constant integer}}
|
|
vec_ctf(vui, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}} expected-error {{argument to '__builtin_altivec_vcfux' must be a constant integer}}
|
|
}
|
|
|
|
void testVCFSX(int index) {
|
|
vec_vcfsx(vsi, index); //expected-error {{argument to '__builtin_altivec_vcfsx' must be a constant integer}}
|
|
}
|
|
|
|
void testVCFUX(int index) {
|
|
vec_vcfux(vui, index); //expected-error {{argument to '__builtin_altivec_vcfux' must be a constant integer}}
|
|
}
|
|
|
|
void testCTS(int index) {
|
|
vec_cts(vf, index); //expected-error {{argument to '__builtin_altivec_vctsxs' must be a constant integer}}
|
|
|
|
}
|
|
|
|
void testVCTSXS(int index) {
|
|
vec_vctsxs(vf, index); //expected-error {{argument to '__builtin_altivec_vctsxs' must be a constant integer}}
|
|
}
|
|
|
|
void testCTU(int index) {
|
|
vec_ctu(vf, index); //expected-error {{argument to '__builtin_altivec_vctuxs' must be a constant integer}}
|
|
|
|
}
|
|
|
|
void testVCTUXS(int index) {
|
|
vec_vctuxs(vf, index); //expected-error {{argument to '__builtin_altivec_vctuxs' must be a constant integer}}
|
|
}
|
|
|
|
void testUnpack128(int index) {
|
|
__builtin_unpack_vector_int128(vsllli, index); //expected-error {{argument to '__builtin_unpack_vector_int128' must be a constant integer}}
|
|
__builtin_unpack_vector_int128(vsllli, 5); //expected-error {{argument value 5 is outside the valid range [0, 1]}}
|
|
}
|
|
|
|
void testDSS(int index) {
|
|
vec_dss(index); //expected-error {{argument to '__builtin_altivec_dss' must be a constant integer}}
|
|
vec_dss(5); //expected-error {{argument value 5 is outside the valid range [0, 3]}}
|
|
}
|
|
|
|
void testDST(int index) {
|
|
vec_dst(&vsi, index, index); //expected-error {{argument to '__builtin_altivec_dst' must be a constant integer}}
|
|
vec_dst(&vsi, index, 5); //expected-error {{argument value 5 is outside the valid range [0, 3]}}
|
|
vec_dstt(&vsi, index, index); //expected-error {{argument to '__builtin_altivec_dstt' must be a constant integer}}
|
|
vec_dstt(&vsi, index, 5); //expected-error {{argument value 5 is outside the valid range [0, 3]}}
|
|
vec_dstst(&vsi, index, index); //expected-error {{argument to '__builtin_altivec_dstst' must be a constant integer}}
|
|
vec_dstst(&vsi, index, 5); //expected-error {{argument value 5 is outside the valid range [0, 3]}}
|
|
vec_dststt(&vsi, index, index); //expected-error {{argument to '__builtin_altivec_dststt' must be a constant integer}}
|
|
vec_dststt(&vsi, index, 5); //expected-error {{argument value 5 is outside the valid range [0, 3]}}
|
|
}
|