Files
clang-p2996/llvm/test/CodeGen/AArch64/fence-singlethread.ll
Tim Northover 1ddc6ab1a9 AArch64: support ISel for fence instructions
Only the most conservative of the DAG patterns matched, leaving GISel with "dmb
ish" everywhere which is inefficient.
2022-05-16 12:01:18 +01:00

23 lines
679 B
LLVM

; 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-apple-ios %s -o - -global-isel | 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 syncscope("singlethread") seq_cst
ret void
}