Debian Codegraph @

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_int4/trivial.ll

raw
1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_INTEL_int4 %s -o - | FileCheck %s
2 ; RUNx: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_INTEL_int4 %s -o - -filetype=obj | spirv-val %}
3
4 ; CHECK: Capability Int4TypeINTEL
5 ; CHECK: Extension "SPV_INTEL_int4"
6 ; CHECK: %[[#Int4:]] = OpTypeInt 4 0
7 ; CHECK: OpTypeFunction %[[#]] %[[#Int4]]
8 ; CHECK: %[[#Int4PtrTy:]] = OpTypePointer Function %[[#Int4]]
9 ; CHECK: %[[#Const:]] = OpConstant %[[#Int4]] 1
10
11 ; CHECK: %[[#Int4Ptr:]] = OpVariable %[[#Int4PtrTy]] Function
12 ; CHECK: OpStore %[[#Int4Ptr]] %[[#Const]]
13 ; CHECK: %[[#Load:]] = OpLoad %[[#Int4]] %[[#Int4Ptr]]
14 ; CHECK: OpFunctionCall %[[#]] %[[#]] %[[#Load]]
15
16 define spir_kernel void @foo() {
17 entry:
18 %0 = alloca i4
19 store i4 1, ptr %0
20 %1 = load i4, ptr %0
21 call spir_func void @boo(i4 %1)
22 ret void
23 }
24
25 declare spir_func void @boo(i4)