Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/OpVectorInsertDynamic.ll

raw
1 ;uint8 foo(uint8 c, unsigned i) {
2 ; c[i] = 42;
3 ; return c;
4 ;}
5
6 ; RUN: llvm-as %s -o %t.bc
7 ; RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s
8 ; RUN: llvm-spirv %t.bc -o %t.spv
9 ; RUN: spirv-val %t.spv
10
11 ; CHECK: TypeInt [[TypeInt:[0-9]+]] 32
12 ; CHECK: TypeVector [[TypeVector:[0-9]+]] [[TypeInt]] 8
13 ; CHECK: VectorInsertDynamic [[TypeVector]] {{[0-9]+}}
14
15 target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
16 target triple = "spir"
17
18 ; Function Attrs: norecurse nounwind readnone
19 define spir_func <8 x i32> @foo(<8 x i32> %c, i32 %i) local_unnamed_addr #0 {
20 entry:
21 %vecins = insertelement <8 x i32> %c, i32 42, i32 %i
22 ret <8 x i32> %vecins
23 }
24
25 attributes #0 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
26
27 !llvm.module.flags = !{!0}
28 !opencl.enable.FP_CONTRACT = !{}
29 !opencl.ocl.version = !{!1}
30 !opencl.spir.version = !{!2}
31 !opencl.used.extensions = !{!3}
32 !opencl.used.optional.core.features = !{!3}
33 !opencl.compiler.options = !{!3}
34 !llvm.ident = !{!4}
35
36 !0 = !{i32 1, !"wchar_size", i32 4}
37 !1 = !{i32 1, i32 0}
38 !2 = !{i32 1, i32 2}
39 !3 = !{}
40 !4 = !{!"clang version 6.0.0 (cfe/trunk)"}