Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/matrix_times_scalar.spt

raw
1 ; RUN: llvm-spirv %s -to-binary -o %t.spv
2 ; RUN: spirv-val %t.spv
3 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.bc
4 ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-LLVM
5
6 ; CHECK-LLVM: %1 = load [4 x <4 x float>], ptr %lhs
7 ; CHECK-LLVM: %2 = load float, ptr %rhs
8 ; CHECK-LLVM: %.splatinsert = insertelement <4 x float> poison, float %2, i64 0
9 ; CHECK-LLVM: %3 = shufflevector <4 x float> %.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
10 ; CHECK-LLVM: %4 = extractvalue [4 x <4 x float>] %1, 0
11 ; CHECK-LLVM: %5 = fmul <4 x float> %4, %3
12 ; CHECK-LLVM: %6 = insertvalue [4 x <4 x float>] undef, <4 x float> %5, 0
13 ; CHECK-LLVM: %7 = extractvalue [4 x <4 x float>] %1, 1
14 ; CHECK-LLVM: %8 = fmul <4 x float> %7, %3
15 ; CHECK-LLVM: %9 = insertvalue [4 x <4 x float>] %6, <4 x float> %8, 1
16 ; CHECK-LLVM: %10 = extractvalue [4 x <4 x float>] %1, 2
17 ; CHECK-LLVM: %11 = fmul <4 x float> %10, %3
18 ; CHECK-LLVM: %12 = insertvalue [4 x <4 x float>] %9, <4 x float> %11, 2
19 ; CHECK-LLVM: %13 = extractvalue [4 x <4 x float>] %1, 3
20 ; CHECK-LLVM: %14 = fmul <4 x float> %13, %3
21 ; CHECK-LLVM: %15 = insertvalue [4 x <4 x float>] %12, <4 x float> %14, 3
22 ; CHECK-LLVM: store [4 x <4 x float>] %15, ptr %res
23
24 119734787 65536 458752 21 0
25 2 Capability Addresses
26 2 Capability Linkage
27 2 Capability Kernel
28 2 Capability Float64
29 2 Capability Matrix
30 3 MemoryModel 2 2
31 8 EntryPoint 6 20 "matrix_times_scalar"
32 3 Source 3 102000
33 3 Name 12 "res"
34 3 Name 13 "lhs"
35 3 Name 14 "rhs"
36
37 2 TypeVoid 5
38 3 TypeFloat 6 32
39 4 TypeVector 7 6 4
40 4 TypeMatrix 8 7 4
41 4 TypePointer 9 7 8 ; 9 : Pointer to Matrix
42 4 TypePointer 10 7 6 ; 10 : Pointer to Scalar
43 6 TypeFunction 11 5 9 9 10
44
45 5 Function 5 20 0 11 ; lhs x rhs -> res
46 3 FunctionParameter 9 12 ; res : Pointer to Matrix
47 3 FunctionParameter 9 13 ; lhs : Pointer to Matrix
48 3 FunctionParameter 10 14 ; rhs : Pointer to Scalar
49
50 2 Label 15
51 4 Load 8 16 13
52 4 Load 6 17 14
53 5 MatrixTimesScalar 8 18 16 17
54 3 Store 12 18
55 1 Return
56
57 1 FunctionEnd