• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=nvptx -mcpu=sm_60 | FileCheck %s
2; RUN: llc < %s -march=nvptx64 -mcpu=sm_60 | FileCheck %s
3
4; CHECK-LABEL: .func test(
5define void @test(double* %dp0, double addrspace(1)* %dp1, double addrspace(3)* %dp3, double %d) {
6; CHECK: atom.add.f64
7  %r1 = call double @llvm.nvvm.atomic.load.add.f64.p0f64(double* %dp0, double %d)
8; CHECK: atom.global.add.f64
9  %r2 = call double @llvm.nvvm.atomic.load.add.f64.p1f64(double addrspace(1)* %dp1, double %d)
10; CHECK: atom.shared.add.f64
11  %ret = call double @llvm.nvvm.atomic.load.add.f64.p3f64(double addrspace(3)* %dp3, double %d)
12  ret void
13}
14
15; CHECK-LABEL: .func test2(
16define void @test2(double* %dp0, double addrspace(1)* %dp1, double addrspace(3)* %dp3, double %d) {
17; CHECK: atom.add.f64
18  %r1 = atomicrmw fadd double* %dp0, double %d seq_cst
19; CHECK: atom.global.add.f64
20  %r2 = atomicrmw fadd double addrspace(1)* %dp1, double %d seq_cst
21; CHECK: atom.shared.add.f64
22  %ret = atomicrmw fadd double addrspace(3)* %dp3, double %d seq_cst
23  ret void
24}
25
26declare double @llvm.nvvm.atomic.load.add.f64.p0f64(double* nocapture, double) #1
27declare double @llvm.nvvm.atomic.load.add.f64.p1f64(double addrspace(1)* nocapture, double) #1
28declare double @llvm.nvvm.atomic.load.add.f64.p3f64(double addrspace(3)* nocapture, double) #1
29
30attributes #1 = { argmemonly nounwind }
31