1//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
2
3typedef int int2 __attribute__((ext_vector_type(2)));
4typedef int int4 __attribute__((ext_vector_type(4)));
5typedef long long2 __attribute__((ext_vector_type(2)));
6
7//CHECK-LABEL: define{{.*}} spir_func void @_Z3barPU3AS1Dv2_i
8void bar(global int2 *in) {
9  //CHECK: bitcast <2 x i32> %{{[0-9]+}} to i64
10  auto l = reinterpret_cast<long>(in[0]);
11  //CHECK: bitcast i64 %{{[0-9]+}} to <2 x i32>
12  auto i2 = reinterpret_cast<int2>(l);
13
14  int4 i4;
15  //CHECK: bitcast <4 x i32> %{{[0-9]+}} to <2 x i64>
16  auto l2 = reinterpret_cast<long2>(i4);
17}
18