1 // RUN
: %clang_cc1 -no-opaque-pointers %s -cl-std
=CL1.2 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s
3 // Test that pointer arguments to kernels are assumed to be ABI aligned.
5 struct __attribute__
((packed, aligned
(1))) packed
{
9 typedef __attribute__
((ext_vector_type(4))) int int4
;
10 typedef __attribute__
((ext_vector_type(2))) float float2
;
18 global struct packed
*p
) {
19 // CHECK-LABEL
: spir_kernel void
@test
(
20 // CHECK-SAME
: i32
* nocapture noundef align
4 %i32
,
21 // CHECK-SAME
: i64
* nocapture noundef align
8 %i64
,
22 // CHECK-SAME
: <4 x i32
>* nocapture noundef align
16 %v4i32
,
23 // CHECK-SAME
: <2 x float
>* nocapture noundef align
8 %v2f32
,
24 // CHECK-SAME
: i8
* nocapture noundef %v
,
25 // CHECK-SAME
: %struct.packed
* nocapture noundef align
1 %p
)