1 // RUN
: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -emit-llvm -o - -O0 | FileCheck %s
3 typedef unsigned char uchar4 __attribute
((ext_vector_type(4)));
4 typedef unsigned int int4 __attribute
((ext_vector_type(4)));
5 typedef float float4 __attribute
((ext_vector_type(4)));
7 // CHECK-LABEL
: define
{{.
*}} spir_kernel void
@ker
()
11 // CHECK
: {{%.
*}} = load i8
, ptr %t
, align
1
12 // CHECK
: {{%.
*}} = trunc i8
{{%.
*}} to i1
13 // CHECK
: {{%.
*}} = sext i1
{{%.
*}} to i32
14 // CHECK
: {{%.
*}} = insertelement
<4 x i32
> poison
, i32
{{%.
*}}, i64
0
15 // CHECK
: {{%.
*}} = shufflevector
<4 x i32
> {{%.
*}}, <4 x i32
> poison
, <4 x i32
> zeroinitializer
16 // CHECK
: store
<4 x i32
> {{%.
*}}, ptr %vec4
, align
16
18 // CHECK
: {{%.
*}} = load i8
, ptr %t
, align
1
19 // CHECK
: {{%.
*}} = trunc i8
{{%.
*}} to i1
20 // CHECK
: {{%.
*}} = zext i1
{{%.
*}} to i32
21 // CHECK
: store i32
{{%.
*}}, ptr %i
, align
4
25 // CHECK
: store
<4 x i8
> splat
(i8 -
1), ptr %vc
, align
4
27 c
= (unsigned char
)true
;
28 // CHECK
: store i8
1, ptr %c
, align
1
32 // CHECK
: store
<4 x float
> splat
(float -
1.000000e+00)