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
96 lines
3.0 KiB
C
96 lines
3.0 KiB
C
// RUN: %clang_cc1 -triple thumbv7k-apple-watchos2.0 -target-abi aapcs16 -target-cpu cortex-a7 %s -o - -emit-llvm | FileCheck %s
|
|
|
|
// REQUIRES: aarch64-registered-target || arm-registered-target
|
|
|
|
#include <arm_neon.h>
|
|
|
|
// Make sure 64 and 128 bit types are naturally aligned by the v7k ABI:
|
|
|
|
// CHECK: target datalayout = "e-m:o-p:32:32-Fi8-i64:64-a:0:32-n32-S128"
|
|
|
|
typedef struct {
|
|
float arr[4];
|
|
} HFA;
|
|
|
|
// CHECK: define{{.*}} void @simple_hfa([4 x float] %h.coerce)
|
|
void simple_hfa(HFA h) {}
|
|
|
|
// CHECK: define{{.*}} %struct.HFA @return_simple_hfa
|
|
HFA return_simple_hfa() { return (HFA){0}; }
|
|
|
|
typedef struct {
|
|
double arr[4];
|
|
} BigHFA;
|
|
|
|
// We don't want any padding type to be included by Clang when using the
|
|
// APCS-VFP ABI, that needs to be handled by LLVM if needed.
|
|
|
|
// CHECK: void @no_padding(i32 noundef %r0, i32 noundef %r1, i32 noundef %r2, [4 x double] %d0_d3.coerce, [4 x double] %d4_d7.coerce, [4 x double] %sp.coerce, i64 noundef %split)
|
|
void no_padding(int r0, int r1, int r2, BigHFA d0_d3, BigHFA d4_d7, BigHFA sp,
|
|
long long split) {}
|
|
|
|
// Structs larger than 16 bytes should be passed indirectly in space allocated
|
|
// by the caller (a pointer to this storage should be what occurs in the arg
|
|
// list).
|
|
|
|
typedef struct {
|
|
float x;
|
|
long long y;
|
|
double z;
|
|
} BigStruct;
|
|
|
|
// CHECK: define{{.*}} void @big_struct_indirect(ptr noundef dead_on_return %b)
|
|
void big_struct_indirect(BigStruct b) {}
|
|
|
|
// CHECK: define{{.*}} void @return_big_struct_indirect(ptr dead_on_unwind noalias writable sret
|
|
BigStruct return_big_struct_indirect() { return (BigStruct){0}; }
|
|
|
|
// Structs smaller than 16 bytes should be passed directly, and coerced to
|
|
// either [N x i32] or [N x i64] depending on alignment requirements.
|
|
|
|
typedef struct {
|
|
float x;
|
|
int y;
|
|
double z;
|
|
} SmallStruct;
|
|
|
|
// CHECK: define{{.*}} void @small_struct_direct([2 x i64] %s.coerce)
|
|
void small_struct_direct(SmallStruct s) {}
|
|
|
|
// CHECK: define{{.*}} [4 x i32] @return_small_struct_direct()
|
|
SmallStruct return_small_struct_direct() { return (SmallStruct){0}; }
|
|
|
|
typedef struct {
|
|
float x;
|
|
int y;
|
|
int z;
|
|
} SmallStructSmallAlign;
|
|
|
|
// CHECK: define{{.*}} void @small_struct_align_direct([3 x i32] %s.coerce)
|
|
void small_struct_align_direct(SmallStructSmallAlign s) {}
|
|
|
|
typedef struct {
|
|
char x;
|
|
short y;
|
|
} PaddedSmallStruct;
|
|
|
|
// CHECK: define{{.*}} i32 @return_padded_small_struct()
|
|
PaddedSmallStruct return_padded_small_struct() { return (PaddedSmallStruct){0}; }
|
|
|
|
typedef struct {
|
|
char arr[7];
|
|
} OddlySizedStruct;
|
|
|
|
// CHECK: define{{.*}} [2 x i32] @return_oddly_sized_struct()
|
|
OddlySizedStruct return_oddly_sized_struct() { return (OddlySizedStruct){0}; }
|
|
|
|
// CHECK: define{{.*}} <4 x float> @test_va_arg_vec(ptr noundef %l)
|
|
|
|
|
|
// CHECK: [[GEP_ALIGN:%.+]] = getelementptr inbounds i8, ptr {{%.*}}, i32 15
|
|
// CHECK: [[ALIGNED:%.*]] = call ptr @llvm.ptrmask.p0.i32(ptr [[GEP_ALIGN]], i32 -16)
|
|
// CHECK: load <4 x float>, ptr [[ALIGNED]], align 16
|
|
float32x4_t test_va_arg_vec(__builtin_va_list l) {
|
|
return __builtin_va_arg(l, float32x4_t);
|
|
}
|