llvm-6502/test/CodeGen/XCore/atomic.ll
Robert Lytton 32e8528c33 Add XCore support for ATOMIC_FENCE.
ATOMIC_FENCE is lowered to a compiler barrier which is codegen only. There
is no need to emit an instructions since the XCore provides sequential
consistency.

Original patch by Richard Osborne

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 10:11:26 +00:00

17 lines
297 B
LLVM

; RUN: llc < %s -march=xcore | FileCheck %s
; CHECK-LABEL: atomic_fence
; CHECK: #MEMBARRIER
; CHECK: #MEMBARRIER
; CHECK: #MEMBARRIER
; CHECK: #MEMBARRIER
; CHECK: retsp 0
define void @atomic_fence() nounwind {
entry:
fence acquire
fence release
fence acq_rel
fence seq_cst
ret void
}