Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/capability-Int64Atomics.ll

raw
1 ; OpenCL C source:
2 ; #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
3 ; #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
4 ;
5 ; void foo (volatile atomic_long *object, long desired) {
6 ; atomic_fetch_xor(object, desired);
7 ;}
8
9 ; RUN: llvm-as %s -o %t.bc
10 ; RUN: llvm-spirv %t.bc -spirv-text -o %t
11 ; RUN: FileCheck < %t %s
12 ; RUN: llvm-spirv %t.bc -o %t.spv
13 ; RUN: spirv-val %t.spv
14
15 ; CHECK: Capability Int64Atomics
16
17 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"
18 target triple = "spir64"
19
20 ; Function Attrs: nounwind
21 define spir_func void @foo(i64 addrspace(4)* %object, i64 %desired) #0 {
22 entry:
23 %call = tail call spir_func i64 @_Z16atomic_fetch_xorPVU3AS4U7_Atomicll(i64 addrspace(4)* %object, i64 %desired) #2
24 ret void
25 }
26
27 declare spir_func i64 @_Z16atomic_fetch_xorPVU3AS4U7_Atomicll(i64 addrspace(4)*, i64) #1
28
29 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" }
30 attributes #1 = { "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" }
31 attributes #2 = { nounwind }
32
33 !opencl.enable.FP_CONTRACT = !{}
34 !opencl.spir.version = !{!0}
35 !opencl.ocl.version = !{!1}
36 !opencl.used.extensions = !{!2}
37 !opencl.used.optional.core.features = !{!2}
38 !opencl.compiler.options = !{!2}
39
40 !0 = !{i32 1, i32 2}
41 !1 = !{i32 2, i32 0}
42 !2 = !{}