brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · f2f97f5 Raw
23 lines · plain
1; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s2; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}3 4; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s5; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}6 7; CHECK-DAG: %[[#type_int32:]] = OpTypeInt 32 08; CHECK-DAG: %[[#type_int64:]] = OpTypeInt 64 09; CHECK-DAG: %[[#type_vec:]] = OpTypeVector %[[#type_int32]] 210; CHECK-DAG: %[[#const1:]] = OpConstant %[[#type_int32]] 111; CHECK-DAG: %[[#vec_const:]] = OpConstantComposite %[[#type_vec]] %[[#const1]] %[[#const1]]12; CHECK-DAG: %[[#const32:]] = OpConstant %[[#type_int64]] 3213 14; CHECK:     %[[#bitcast_res:]] = OpBitcast %[[#type_int64]] %[[#vec_const]]15; CHECK:     %[[#shift_res:]] = OpShiftRightLogical %[[#type_int64]] %[[#bitcast_res]] %[[#const32]]16 17define void @foo(i64* %arg) {18entry:19  %0 = lshr i64 bitcast (<2 x i32> <i32 1, i32 1> to i64), 3220  store i64 %0, i64* %arg21  ret void22}23