Debian Codegraph @

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

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -spirv-text -o %t.spt
3 ; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
4 ; RUN: llvm-spirv %t.bc -o %t.spv
5 ; RUN: spirv-val %t.spv
6
7 ; CHECK-SPIRV: 5 BitwiseAnd
8 ; CHECK-SPIRV-NEXT: 5 INotEqual
9
10 ; LLVM IR was generated with -cl-std=c++ option
11
12 ; ModuleID = 'main'
13 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"
14 target triple = "spir64-unknown-unknown"
15
16 ; Function Attrs: nounwind
17 define spir_kernel void @test(i32 %op1, i32 %op2, i8 %op3) #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !4 !kernel_arg_type_qual !5 {
18 entry:
19 %0 = trunc i8 %op3 to i1
20 %call = call spir_func i32 @_Z14__spirv_Selectbii(i1 zeroext %0, i32 %op1, i32 %op2) #2
21 ret void
22 }
23
24 ; Function Attrs: nounwind readnone
25 declare spir_func i32 @_Z14__spirv_Selectbii(i1 zeroext, i32, i32) #1
26
27 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
28 attributes #1 = { nounwind readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
29 attributes #2 = { nounwind readnone }
30
31 !opencl.enable.FP_CONTRACT = !{}
32 !opencl.spir.version = !{!6}
33 !opencl.ocl.version = !{!7}
34 !opencl.used.extensions = !{!8}
35 !opencl.used.optional.core.features = !{!8}
36 !opencl.compiler.options = !{!8}
37 !llvm.ident = !{!9}
38
39 !1 = !{i32 0, i32 0}
40 !2 = !{!"none", !"none"}
41 !3 = !{!"i32", !"i32"}
42 !4 = !{!"i32", !"i32"}
43 !5 = !{!"", !""}
44 !6 = !{i32 1, i32 2}
45 !7 = !{i32 2, i32 0}
46 !8 = !{}
47 !9 = !{!"clang version 3.6.1"}