reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 -mattr=+ptx60 | FileCheck %s

declare void @llvm.nvvm.bar.warp.sync(i32)
declare void @llvm.nvvm.barrier.sync(i32)
declare void @llvm.nvvm.barrier.sync.cnt(i32, i32)

; CHECK-LABEL: .func{{.*}}barrier.sync
define void @barrier.sync(i32 %id, i32 %cnt) {
  ; CHECK: ld.param.u32 	[[ID:%r[0-9]+]], [barrier.sync_param_0];
  ; CHECK: ld.param.u32 	[[CNT:%r[0-9]+]], [barrier.sync_param_1];

  ; CHECK:  barrier.sync [[ID]], [[CNT]];
  call void @llvm.nvvm.barrier.sync.cnt(i32 %id, i32 %cnt)
  ; CHECK:  barrier.sync [[ID]], 2;
  call void @llvm.nvvm.barrier.sync.cnt(i32 %id, i32 2)
  ; CHECK:  barrier.sync 3, [[CNT]];
  call void @llvm.nvvm.barrier.sync.cnt(i32 3, i32 %cnt)
  ; CHECK:  barrier.sync 4, 5;
  call void @llvm.nvvm.barrier.sync.cnt(i32 4, i32 5)

  ; CHECK: barrier.sync [[ID]];
  call void @llvm.nvvm.barrier.sync(i32 %id)
  ; CHECK: barrier.sync 1;
  call void @llvm.nvvm.barrier.sync(i32 1)

  ; CHECK: bar.warp.sync [[ID]];
  call void @llvm.nvvm.bar.warp.sync(i32 %id)
  ; CHECK: bar.warp.sync 6;
  call void @llvm.nvvm.bar.warp.sync(i32 6)
  ret void;
}