diff options
author | Robert Lytton <robert@xmos.com> | 2013-11-12 10:11:26 +0000 |
---|---|---|
committer | Robert Lytton <robert@xmos.com> | 2013-11-12 10:11:26 +0000 |
commit | 32e8528c3368d5e0986cb265b436799cc490ea0c (patch) | |
tree | db91eca62ea74e7333238360b8342865d89ce151 /test | |
parent | c17ea93ed516d5c7d03a8d5c7fc470a0f254b58a (diff) | |
download | external_llvm-32e8528c3368d5e0986cb265b436799cc490ea0c.zip external_llvm-32e8528c3368d5e0986cb265b436799cc490ea0c.tar.gz external_llvm-32e8528c3368d5e0986cb265b436799cc490ea0c.tar.bz2 |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/XCore/atomic.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/atomic.ll b/test/CodeGen/XCore/atomic.ll new file mode 100644 index 0000000..95fca9a --- /dev/null +++ b/test/CodeGen/XCore/atomic.ll @@ -0,0 +1,16 @@ +; 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 +} |