llvm/test/CodeGen/ARM/fence-singlethread.ll
Tim Northover ff268972fc ARM: lower "fence singlethread" to a pure compiler barrier.
Single-threaded fences aren't required to provide any synchronization with
other processing elements so there's no need for a DMB. They should still be a
barrier for compiler optimizations though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300904 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 21:56:52 +00:00

17 lines
448 B
LLVM

; RUN: llc -mtriple=thumbv7-linux-gnueabihf %s -o - | FileCheck %s
; RUN: llc -mtriple=thumbv7-apple-ios %s -o - | FileCheck %s
; RUN: llc -mtriple=thumbv7-linux-gnueabihf %s -filetype=obj -o %t
; RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=OBJ
; OBJ-NOT: dmb
define void @fence_singlethread() {
; CHECK-LABEL: fence_singlethread:
; CHECK-NOT: dmb
; CHECK: @ COMPILER BARRIER
; CHECK-NOT: dmb
fence singlethread seq_cst
ret void
}