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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix=SM60
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_70 -mattr=+ptx60 | FileCheck %s --check-prefix=SM70
; RUN: %if ptxas-12.2 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_70 -mattr=+ptx60 | %ptxas-verify -arch=sm_70 %}
; TODO: implement and test thread scope.
; CHECK-LABEL: fence_sc_sys
define void @fence_sc_sys() local_unnamed_addr {
; SM60: membar.sys
; SM70: fence.sc.sys
fence seq_cst
ret void
}
; CHECK-LABEL: fence_acq_rel_sys
define void @fence_acq_rel_sys() local_unnamed_addr {
; SM60: membar.sys
; SM70: fence.acq_rel.sys
fence acq_rel
ret void
}
; CHECK-LABEL: fence_release_sys
define void @fence_release_sys() local_unnamed_addr {
; SM60: membar.sys
; SM70: fence.acq_rel.sys
fence release
ret void
}
; CHECK-LABEL: fence_acquire_sys
define void @fence_acquire_sys() local_unnamed_addr {
; SM60: membar.sys
; SM70: fence.acq_rel.sys
fence acquire
ret void
}
; CHECK-LABEL: fence_sc_gpu
define void @fence_sc_gpu() local_unnamed_addr {
; SM60: membar.gl
; SM70: fence.sc.gpu
fence syncscope("device") seq_cst
ret void
}
; CHECK-LABEL: fence_acq_rel_gpu
define void @fence_acq_rel_gpu() local_unnamed_addr {
; SM60: membar.gl
; SM70: fence.acq_rel.gpu
fence syncscope("device") acq_rel
ret void
}
; CHECK-LABEL: fence_release_gpu
define void @fence_release_gpu() local_unnamed_addr {
; SM60: membar.gl
; SM70: fence.acq_rel.gpu
fence syncscope("device") release
ret void
}
; CHECK-LABEL: fence_acquire_gpu
define void @fence_acquire_gpu() local_unnamed_addr {
; SM60: membar.gl
; SM70: fence.acq_rel.gpu
fence syncscope("device") acquire
ret void
}
; CHECK-LABEL: fence_sc_cta
define void @fence_sc_cta() local_unnamed_addr {
; SM60: membar.cta
; SM70: fence.sc.cta
fence syncscope("block") seq_cst
ret void
}
; CHECK-LABEL: fence_acq_rel_cta
define void @fence_acq_rel_cta() local_unnamed_addr {
; SM60: membar.cta
; SM70: fence.acq_rel.cta
fence syncscope("block") acq_rel
ret void
}
; CHECK-LABEL: fence_release_cta
define void @fence_release_cta() local_unnamed_addr {
; SM60: membar.cta
; SM70: fence.acq_rel.cta
fence syncscope("block") release
ret void
}
; CHECK-LABEL: fence_acquire_cta
define void @fence_acquire_cta() local_unnamed_addr {
; SM60: membar.cta
; SM70: fence.acq_rel.cta
fence syncscope("block") acquire
ret void
}
|