Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/transcoding/isequal.ll

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -spirv-text -o %t.txt
3 ; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV
4 ; RUN: llvm-spirv %t.bc -o %t.spv
5 ; RUN: spirv-val %t.spv
6 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc
7 ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
8
9 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
10 target triple = "spir64-unknown-unknown"
11
12 ; CHECK-SPIRV-NOT: SConvert
13
14 ; Check no OpenCL convert builtin function generated
15 ; CHECK-LLVM-NOT: call {{.*}} @_Z{{[0-9]*}}convert
16
17 ; Function Attrs: nounwind
18 define spir_kernel void @math_kernel8(<8 x i32> addrspace(1)* nocapture %out, <8 x float> addrspace(1)* nocapture readonly %in1, <8 x float> addrspace(1)* nocapture readonly %in2) #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !5 !kernel_arg_type_qual !4 {
19 entry:
20 %call = tail call spir_func i64 @_Z13get_global_idj(i32 0) #2
21 %sext = shl i64 %call, 32
22 %idxprom = ashr exact i64 %sext, 32
23 %arrayidx = getelementptr inbounds <8 x float>, <8 x float> addrspace(1)* %in1, i64 %idxprom
24 %0 = load <8 x float>, <8 x float> addrspace(1)* %arrayidx, align 32, !tbaa !9
25 %arrayidx2 = getelementptr inbounds <8 x float>, <8 x float> addrspace(1)* %in2, i64 %idxprom
26 %1 = load <8 x float>, <8 x float> addrspace(1)* %arrayidx2, align 32, !tbaa !9
27 %call3 = tail call spir_func <8 x i32> @_Z7isequalDv8_fDv8_f(<8 x float> %0, <8 x float> %1) #2
28 %arrayidx5 = getelementptr inbounds <8 x i32>, <8 x i32> addrspace(1)* %out, i64 %idxprom
29 store <8 x i32> %call3, <8 x i32> addrspace(1)* %arrayidx5, align 32, !tbaa !9
30 ret void
31 }
32
33 ; Function Attrs: nounwind
34 declare spir_func i64 @_Z13get_global_idj(i32) #1
35
36 ; Function Attrs: nounwind
37 declare spir_func <8 x i32> @_Z7isequalDv8_fDv8_f(<8 x float>, <8 x float>) #1
38
39 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" }
40 attributes #1 = { 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" }
41 attributes #2 = { nounwind }
42
43 !opencl.enable.FP_CONTRACT = !{}
44 !opencl.spir.version = !{!6}
45 !opencl.ocl.version = !{!6}
46 !opencl.used.extensions = !{!7}
47 !opencl.used.optional.core.features = !{!7}
48 !opencl.compiler.options = !{!7}
49 !llvm.ident = !{!8}
50
51 !1 = !{i32 1, i32 1, i32 1}
52 !2 = !{!"none", !"none", !"none"}
53 !3 = !{!"int8*", !"float8*", !"float8*"}
54 !4 = !{!"", !"", !""}
55 !5 = !{!"int8*", !"float8*", !"float8*"}
56 !6 = !{i32 2, i32 0}
57 !7 = !{}
58 !8 = !{!"clang version 3.4 "}
59 !9 = !{!10, !10, i64 0}
60 !10 = !{!"omnipotent char", !11, i64 0}
61 !11 = !{!"Simple C/C++ TBAA"}