Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/extensions/INTEL/SPV_INTEL_int4/cooperative_matrix.ll

raw
1 ; RUN: llvm-as < %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_KHR_cooperative_matrix,+SPV_INTEL_int4 -o %t.spv
3 ; RUN: llvm-spirv %t.spv -to-text -o %t.spt
4 ; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
5
6 ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
7 ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
8
9 ; CHECK-SPIRV-DAG: Capability Int4TypeINTEL
10 ; CHECK-SPIRV-DAG: Capability CooperativeMatrixKHR
11 ; CHECK-SPIRV-DAG: Extension "SPV_INTEL_int4"
12 ; CHECK-SPIRV-DAG: Capability Int4CooperativeMatrixINTEL
13 ; CHECK-SPIRV-DAG: Extension "SPV_KHR_cooperative_matrix"
14 ; CHECK-SPIRV-DAG: TypeInt [[#Int4Ty:]] 4 0
15 ; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#CoopMatTy:]] [[#Int4Ty]] [[#]] [[#]] [[#]] [[#]]
16 ; CHECK-SPIRV-DAG: CompositeConstruct [[#CoopMatTy]]
17
18 ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i4, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructi(i4 0)
19
20 ; ModuleID = 'matrix-int4-test.bc'
21 source_filename = "matrix-int4-test.cpp"
22 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
23 target triple = "spir64-unknown-unknown"
24
25 define spir_kernel void @foo() {
26 entry:
27 %call.i.i = tail call spir_func noundef target("spirv.CooperativeMatrixKHR", i4, 3, 12, 12, 2) @_Z26__spirv_CompositeConstruct(i4 noundef 0)
28 ret void
29 }
30
31 declare dso_local spir_func noundef target("spirv.CooperativeMatrixKHR", i4, 3, 12, 12, 2) @_Z26__spirv_CompositeConstruct(i4 noundef)