summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-04-21 20:36:08 +0000
committerTim Northover <tnorthover@apple.com>2017-04-21 20:36:08 +0000
commit1efaa3a88fbcca9db80ad7a46d2f6066bffc19de (patch)
tree0b1bdaa25f3f197d75a6e6fb588c26b693f66256
parente31cf3f824786e020f4dea9ad216a65538f8a630 (diff)
downloadbcm5719-llvm-1efaa3a88fbcca9db80ad7a46d2f6066bffc19de.tar.gz
bcm5719-llvm-1efaa3a88fbcca9db80ad7a46d2f6066bffc19de.zip
AArch64: add test for "fence singlethread"
Forgot a git add yesterday. llvm-svn: 301037
-rw-r--r--llvm/test/CodeGen/AArch64/fence-singlethread.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/fence-singlethread.ll b/llvm/test/CodeGen/AArch64/fence-singlethread.ll
new file mode 100644
index 00000000000..2ed74427738
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/fence-singlethread.ll
@@ -0,0 +1,21 @@
+; RUN: llc -mtriple=aarch64-linux-gnu %s -o - | FileCheck %s --check-prefix=LINUX
+; RUN: llc -mtriple=aarch64-apple-ios %s -o - | FileCheck %s --check-prefix=IOS
+; RUN: llc -mtriple=aarch64-linux-gnueabihf %s -filetype=obj -o %t
+; RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=OBJ
+
+; OBJ-NOT: dmb
+
+define void @fence_singlethread() {
+; LINUX-LABEL: fence_singlethread:
+; LINUX-NOT: dmb
+; LINUX: // COMPILER BARRIER
+; LINUX-NOT: dmb
+
+; IOS-LABEL: fence_singlethread:
+; IOS-NOT: dmb
+; IOS: ; COMPILER BARRIER
+; IOS-NOT: dmb
+
+ fence singlethread seq_cst
+ ret void
+}
OpenPOWER on IntegriCloud