60 lines · plain
1; Check names and decoration of global variables.2 3; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s4; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}5 6; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s7; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}8 9; CHECK-DAG: OpName %[[#id18:]] "G1"10; CHECK-DAG: OpName %[[#id22:]] "g1"11; CHECK-DAG: OpName %[[#id23:]] "g2"12; CHECK-DAG: OpName %[[#id27:]] "g4"13; CHECK-DAG: OpName %[[#id30:]] "c1"14; CHECK-DAG: OpName %[[#id31:]] "n_t"15; CHECK-DAG: OpName %[[#id32:]] "w"16; CHECK-DAG: OpName %[[#id34:]] "a.b"17; CHECK-DAG: OpName %[[#id35:]] "e"18; CHECK-DAG: OpName %[[#id36:]] "y.z"19; CHECK-DAG: OpName %[[#id38:]] "x"20 21; CHECK-NOT: OpDecorate %[[#id18]] LinkageAttributes22; CHECK-DAG: OpDecorate %[[#id18]] Constant23; CHECK-DAG: OpDecorate %[[#id22]] Alignment 424; CHECK-DAG: OpDecorate %[[#id22]] LinkageAttributes "g1" Export25; CHECK-DAG: OpDecorate %[[#id23]] Alignment 426; CHECK-DAG: OpDecorate %[[#id27]] Alignment 427; CHECK-DAG: OpDecorate %[[#id27]] LinkageAttributes "g4" Export28; CHECK-DAG: OpDecorate %[[#id30]] Constant29; CHECK-DAG: OpDecorate %[[#id30]] Alignment 430; CHECK-DAG: OpDecorate %[[#id30]] LinkageAttributes "c1" Export31; CHECK-DAG: OpDecorate %[[#id31]] Constant32; CHECK-DAG: OpDecorate %[[#id31]] LinkageAttributes "n_t" Import33; CHECK-DAG: OpDecorate %[[#id32]] Constant34; CHECK-DAG: OpDecorate %[[#id32]] Alignment 435; CHECK-DAG: OpDecorate %[[#id32]] LinkageAttributes "w" Export36; CHECK-DAG: OpDecorate %[[#id34]] Constant37; CHECK-DAG: OpDecorate %[[#id34]] Alignment 438; CHECK-DAG: OpDecorate %[[#id35]] LinkageAttributes "e" Import39; CHECK-DAG: OpDecorate %[[#id36]] Alignment 440; CHECK-DAG: OpDecorate %[[#id38]] Constant41; CHECK-DAG: OpDecorate %[[#id38]] Alignment 442 43%"class.sycl::_V1::nd_item" = type { i8 }44 45@G1 = private unnamed_addr addrspace(1) constant %"class.sycl::_V1::nd_item" poison, align 146@g1 = addrspace(1) global i32 1, align 447@g2 = internal addrspace(1) global i32 2, align 448@g4 = common addrspace(1) global i32 0, align 449@c1 = addrspace(2) constant [2 x i32] [i32 0, i32 1], align 450@n_t = external addrspace(2) constant [256 x i32]51@w = addrspace(1) constant i32 0, align 452@a.b = internal addrspace(2) constant [2 x i32] [i32 2, i32 3], align 453@e = external addrspace(1) global i3254@y.z = internal addrspace(1) global i32 0, align 455@x = internal addrspace(2) constant float 1.000000e+00, align 456 57define internal spir_func void @foo(ptr addrspace(4) align 1 %arg) {58 ret void59}60