| 1 |
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s |
| 2 |
|
| 3 |
; TODO: enable spirv-val once we can add cooperative matrix capability and extension |
| 4 |
|
| 5 |
; CHECK: [[float_t:%[0-9]+]] = OpTypeFloat 32 |
| 6 |
; CHECK: [[uint32_t:%[0-9]+]] = OpTypeInt 32 0 |
| 7 |
|
| 8 |
; CHECK: [[uint32_2:%[0-9]+]] = OpConstant [[uint32_t]] 2 |
| 9 |
%scope = type target("spirv.IntegralConstant", i32, 2) ; Workgroup |
| 10 |
; CHECK: [[uint32_4:%[0-9]+]] = OpConstant [[uint32_t]] 4 |
| 11 |
%cols = type target("spirv.IntegralConstant", i32, 4) |
| 12 |
%rows = type target("spirv.IntegralConstant", i32, 4) |
| 13 |
; CHECK: [[uint32_0:%[0-9]+]] = OpConstant [[uint32_t]] 0 |
| 14 |
%use = type target("spirv.IntegralConstant", i32, 0) ; MatrixAKHR |
| 15 |
|
| 16 |
; CHECK: OpUnknown(4456, 7) [[coop_t:%[0-9]+]] [[float_t]] [[uint32_2]] [[uint32_4]] [[uint32_4]] [[uint32_0]] |
| 17 |
%coop_t = type target("spirv.Type", float, %scope, %rows, %cols, %use, 4456, 0, 0) |
| 18 |
|
| 19 |
; CHECK: [[getCooperativeMatrix_t:%[0-9]+]] = OpTypeFunction [[coop_t]] |
| 20 |
|
| 21 |
; CHECK: [[getCooperativeMatrix:%[0-9]+]] = OpFunction [[coop_t]] None [[getCooperativeMatrix_t]] |
| 22 |
declare %coop_t @getCooperativeMatrix() |
| 23 |
|
| 24 |
define void @main() #1 { |
| 25 |
entry: |
| 26 |
; CHECK: {{%[0-9]+}} = OpFunctionCall [[coop_t]] [[getCooperativeMatrix]] |
| 27 |
%coop = call %coop_t @getCooperativeMatrix() |
| 28 |
|
| 29 |
ret void |
| 30 |
} |