Xamarin Public Jenkins (auto-signing) f32dbaf0b2 Imported Upstream version 5.18.0.225
Former-commit-id: 10196d987d5fc5564b9d3b33b1fdf13190f4d0b5
2018-12-21 19:01:49 +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
}