1 ; RUN: opt -S -passes=sink < %s | FileCheck %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-unknown-linux-gnu"
5 define void @test1(ptr) {
8 fence syncscope("singlethread") seq_cst
9 %2 = load i32, ptr %1, align 4
10 fence syncscope("singlethread") seq_cst
11 %3 = icmp eq i32 %2, 0
12 br i1 %3, label %fail, label %pass
17 pass: ; preds = %fail, %top
21 ; CHECK-LABEL: @test1(
22 ; CHECK: %[[call:.*]] = call ptr %0()
23 ; CHECK: fence syncscope("singlethread") seq_cst
24 ; CHECK: load i32, ptr %[[call]], align 4
25 ; CHECK: fence syncscope("singlethread") seq_cst
28 attributes #0 = { nounwind readnone }