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
61 lines
1.5 KiB
C
61 lines
1.5 KiB
C
// RUN: %clang_cc1 %s -triple=powerpc-ibm-aix -target-feature +altivec -verify -pedantic -fsyntax-only
|
|
|
|
typedef int v4 __attribute((vector_size(16)));
|
|
typedef short v8 __attribute((vector_size(16)));
|
|
|
|
v8 foo(void) {
|
|
v8 a;
|
|
v4 b;
|
|
a = (v8){4, 2};
|
|
b = (v4)(5, 6, 7, 8, 9); // expected-warning {{excess elements in vector initializer}}
|
|
b = (v4)(5, 6, 8, 8.0f);
|
|
|
|
vector int vi;
|
|
vi = (vector int)(1);
|
|
vi = (vector int)(1, 2); // expected-error {{number of elements must be either one or match the size of the vector}}
|
|
vi = (vector int)(1, 2, 3, 4);
|
|
vi = (vector int)(1, 2, 3, 4, 5); // expected-warning {{excess elements in vector initializer}}
|
|
vi = (vector int){1};
|
|
vi = (vector int){1, 2};
|
|
vi = (vector int){1, 2, 3, 4, 5}; // expected-warning {{excess elements in vector initializer}}
|
|
vector float vf;
|
|
vf = (vector float)(1.0);
|
|
|
|
return (v8){0, 1, 2, 3, 1, 2, 3, 4};
|
|
|
|
// FIXME: test that (type)(fn)(args) still works with -maltivec
|
|
// FIXME: test that c++ overloaded commas still work -maltivec
|
|
}
|
|
|
|
void __attribute__((__overloadable__)) f(v4 a)
|
|
{
|
|
}
|
|
|
|
void __attribute__((__overloadable__)) f(int a)
|
|
{
|
|
}
|
|
|
|
void test(void)
|
|
{
|
|
v4 vGCC;
|
|
vector int vAltiVec;
|
|
|
|
f(vAltiVec);
|
|
vGCC = vAltiVec;
|
|
int res = vGCC > vAltiVec;
|
|
vAltiVec = 0 ? vGCC : vGCC;
|
|
}
|
|
|
|
typedef struct VecMem {
|
|
vector signed vec;
|
|
} VecMem;
|
|
|
|
// The following should not assert. See qiongsiwu1's comment here:
|
|
// https://reviews.llvm.org/D115670
|
|
void test2(void) {
|
|
vector signed local_vec = {1, 2, 3, 4};
|
|
VecMem VM;
|
|
VM.vec = ++local_vec;
|
|
}
|
|
|