Xamarin Public Jenkins (auto-signing) e19d552987 Imported Upstream version 5.18.0.161
Former-commit-id: 4db48158d3a35497b8f118ab21b5f08ac3d86d98
2018-10-19 08:34:24 +00:00

48 lines
1.0 KiB
LLVM

; RUN: opt -instcombine -S %s | FileCheck %s
; Make sure we collapse the fences in this case
; CHECK-LABEL: define void @tinkywinky
; CHECK-NEXT: fence seq_cst
; CHECK-NEXT: fence syncscope("singlethread") acquire
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @tinkywinky() {
fence seq_cst
fence seq_cst
fence seq_cst
fence syncscope("singlethread") acquire
fence syncscope("singlethread") acquire
fence syncscope("singlethread") acquire
ret void
}
; CHECK-LABEL: define void @dipsy
; CHECK-NEXT: fence seq_cst
; CHECK-NEXT: fence syncscope("singlethread") seq_cst
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @dipsy() {
fence seq_cst
fence syncscope("singlethread") seq_cst
ret void
}
; CHECK-LABEL: define void @patatino
; CHECK-NEXT: fence acquire
; CHECK-NEXT: fence seq_cst
; CHECK-NEXT: fence acquire
; CHECK-NEXT: fence seq_cst
; CHECK-NEXT: ret void
; CHECK-NEXT: }
define void @patatino() {
fence acquire
fence seq_cst
fence acquire
fence seq_cst
ret void
}