Debian Codegraph @

llvm/test/CodeGen/SPIRV/inline/type.undef.ll

raw
1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
3 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - | spirv-as - -o - | spirv-val %}
4
5 %literal_32 = type target("spirv.Literal", 32)
6 %literal_true = type target("spirv.Literal", 1)
7
8 ; CHECK-DAG: OpUnknown(21, 4) [[int_t:%[0-9]+]] 32 1
9 %int_t = type target("spirv.Type", %literal_32, %literal_true, 21, 4, 32)
10
11 ; CHECK-DAG: {{%[0-9]+}} = OpTypeFunction [[int_t]]
12 define %int_t @foo() {
13 entry:
14 %v = alloca %int_t
15 %i = load %int_t, ptr %v
16
17 ; CHECK-DAG: [[i:%[0-9]+]] = OpUndef [[int_t]]
18 ; CHECK-DAG: OpReturnValue [[i]]
19 ret %int_t %i
20 }