1 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
4 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
5 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
7 ; CHECK-DAG: %[[#type_int32:]] = OpTypeInt 32 0
8 ; CHECK-DAG: %[[#type_int64:]] = OpTypeInt 64 0
9 ; CHECK-DAG: %[[#type_vec:]] = OpTypeVector %[[#type_int32]] 2
10 ; CHECK-DAG: %[[#const1:]] = OpConstant %[[#type_int32]] 1
11 ; CHECK-DAG: %[[#vec_const:]] = OpConstantComposite %[[#type_vec]] %[[#const1]] %[[#const1]]
12 ; CHECK-DAG: %[[#const32:]] = OpConstant %[[#type_int64]] 32
14 ; CHECK: %[[#bitcast_res:]] = OpBitcast %[[#type_int64]] %[[#vec_const]]
15 ; CHECK: %[[#shift_res:]] = OpShiftRightLogical %[[#type_int64]] %[[#bitcast_res]] %[[#const32]]
17 define void @foo(i64* %arg) {
19 %0 = lshr i64 bitcast (<2 x i32> <i32 1, i32 1> to i64), 32
20 store i64 %0, i64* %arg