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
85 lines
1.3 KiB
C
85 lines
1.3 KiB
C
// RUN: %clang_cc1 -triple s390x-ibm-zos -O2 -emit-llvm %s -o - | FileCheck %s --check-prefix=X64
|
|
#include <stddef.h>
|
|
void *__malloc31(size_t);
|
|
|
|
int test_1() {
|
|
// X64-LABEL: define {{.*}} i32 @test_1()
|
|
// X64: ret i32 %add20
|
|
int *__ptr32 a;
|
|
int *b;
|
|
int i;
|
|
int sum1, sum2, sum3;
|
|
|
|
a = (int *__ptr32)__malloc31(sizeof(int) * 10);
|
|
|
|
b = a;
|
|
sum1 = 0;
|
|
for (i = 0; i < 10; ++i) {
|
|
a[i] = i;
|
|
sum1 += i;
|
|
}
|
|
|
|
sum2 = 0;
|
|
for (i = 0; i < 10; ++i) {
|
|
sum2 += a[i];
|
|
}
|
|
sum3 = 0;
|
|
for (i = 0; i < 10; ++i) {
|
|
sum3 += b[i];
|
|
}
|
|
|
|
return (sum1 + sum2 + sum3);
|
|
}
|
|
|
|
int test_2() {
|
|
// X64-LABEL: define {{.*}} i32 @test_2()
|
|
// X64: ret i32 4
|
|
int *a = (int *)__malloc31(sizeof(int));
|
|
int *__ptr32 b;
|
|
|
|
*a = 99;
|
|
b = a;
|
|
*b = 44;
|
|
|
|
// Test should return 4
|
|
return (*b - 40);
|
|
}
|
|
|
|
int test_3() {
|
|
// X64-LABEL: define {{.*}} i32 @test_3()
|
|
// X64: ret i32 4
|
|
int *a = (int *)__malloc31(sizeof(int));
|
|
int *__ptr32 b;
|
|
|
|
*a = 99;
|
|
b = a;
|
|
|
|
// Test should return 4
|
|
return (*b - 95);
|
|
}
|
|
|
|
int test_4() {
|
|
// X64-LABEL: define {{.*}} i32 @test_4()
|
|
// X64: ret i32 1
|
|
int *a = (int *)__malloc31(sizeof(int));
|
|
float *d = (float *)__malloc31(sizeof(float));
|
|
|
|
int *__ptr32 b;
|
|
int *c;
|
|
|
|
float *__ptr32 e;
|
|
float *f;
|
|
|
|
*a = 0;
|
|
*d = 0.0;
|
|
|
|
b = a;
|
|
c = a;
|
|
e = d;
|
|
f = d;
|
|
|
|
// Test should return 1
|
|
return (b == c && e == f);
|
|
}
|
|
|