Files
TheRock/compiler/amd-llvm/clang/test/CodeGen/X86/bfloat-abi.c
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

150 lines
2.2 KiB
C

// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -target-feature +sse2 < %s | FileCheck %s --check-prefixes=CHECK
struct bfloat1 {
__bf16 a;
};
struct bfloat1 h1(__bf16 a) {
// CHECK: define{{.*}}bfloat @
struct bfloat1 x;
x.a = a;
return x;
}
struct bfloat2 {
__bf16 a;
__bf16 b;
};
struct bfloat2 h2(__bf16 a, __bf16 b) {
// CHECK: define{{.*}}<2 x bfloat> @
struct bfloat2 x;
x.a = a;
x.b = b;
return x;
}
struct bfloat3 {
__bf16 a;
__bf16 b;
__bf16 c;
};
struct bfloat3 h3(__bf16 a, __bf16 b, __bf16 c) {
// CHECK: define{{.*}}<4 x bfloat> @
struct bfloat3 x;
x.a = a;
x.b = b;
x.c = c;
return x;
}
struct bfloat4 {
__bf16 a;
__bf16 b;
__bf16 c;
__bf16 d;
};
struct bfloat4 h4(__bf16 a, __bf16 b, __bf16 c, __bf16 d) {
// CHECK: define{{.*}}<4 x bfloat> @
struct bfloat4 x;
x.a = a;
x.b = b;
x.c = c;
x.d = d;
return x;
}
struct floatbfloat {
float a;
__bf16 b;
};
struct floatbfloat fh(float a, __bf16 b) {
// CHECK: define{{.*}}<4 x half> @
struct floatbfloat x;
x.a = a;
x.b = b;
return x;
}
struct floatbfloat2 {
float a;
__bf16 b;
__bf16 c;
};
struct floatbfloat2 fh2(float a, __bf16 b, __bf16 c) {
// CHECK: define{{.*}}<4 x half> @
struct floatbfloat2 x;
x.a = a;
x.b = b;
x.c = c;
return x;
}
struct bfloatfloat {
__bf16 a;
float b;
};
struct bfloatfloat hf(__bf16 a, float b) {
// CHECK: define{{.*}}<4 x half> @
struct bfloatfloat x;
x.a = a;
x.b = b;
return x;
}
struct bfloat2float {
__bf16 a;
__bf16 b;
float c;
};
struct bfloat2float h2f(__bf16 a, __bf16 b, float c) {
// CHECK: define{{.*}}<4 x bfloat> @
struct bfloat2float x;
x.a = a;
x.b = b;
x.c = c;
return x;
}
struct floatbfloat3 {
float a;
__bf16 b;
__bf16 c;
__bf16 d;
};
struct floatbfloat3 fh3(float a, __bf16 b, __bf16 c, __bf16 d) {
// CHECK: define{{.*}}{ <4 x half>, bfloat } @
struct floatbfloat3 x;
x.a = a;
x.b = b;
x.c = c;
x.d = d;
return x;
}
struct bfloat5 {
__bf16 a;
__bf16 b;
__bf16 c;
__bf16 d;
__bf16 e;
};
struct bfloat5 h5(__bf16 a, __bf16 b, __bf16 c, __bf16 d, __bf16 e) {
// CHECK: define{{.*}}{ <4 x bfloat>, bfloat } @
struct bfloat5 x;
x.a = a;
x.b = b;
x.c = c;
x.d = d;
x.e = e;
return x;
}