forked from OSchip/llvm-project
18 lines
611 B
Plaintext
18 lines
611 B
Plaintext
|
//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
|
||
|
|
||
|
typedef int int2 __attribute__((ext_vector_type(2)));
|
||
|
typedef int int4 __attribute__((ext_vector_type(4)));
|
||
|
typedef long long2 __attribute__((ext_vector_type(2)));
|
||
|
|
||
|
//CHECK-LABEL: define{{.*}} spir_func void @_Z3barPU3AS1Dv2_i
|
||
|
void bar(global int2 *in) {
|
||
|
//CHECK: bitcast <2 x i32> %{{[0-9]+}} to i64
|
||
|
auto l = reinterpret_cast<long>(in[0]);
|
||
|
//CHECK: bitcast i64 %{{[0-9]+}} to <2 x i32>
|
||
|
auto i2 = reinterpret_cast<int2>(l);
|
||
|
|
||
|
int4 i4;
|
||
|
//CHECK: bitcast <4 x i32> %{{[0-9]+}} to <2 x i64>
|
||
|
auto l2 = reinterpret_cast<long2>(i4);
|
||
|
}
|