brintos

brintos / llvm-project-archived public Read only

0
0
Text · 802 B · 6f52474 Raw
29 lines · plain
1; RUN: opt -S -passes=sink < %s | FileCheck %s2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"3target triple = "x86_64-unknown-linux-gnu"4 5define void @test1(ptr) {6entry:7  %1 = call ptr %0() #08  fence syncscope("singlethread") seq_cst9  %2 = load i32, ptr %1, align 410  fence syncscope("singlethread") seq_cst11  %3 = icmp eq i32 %2, 012  br i1 %3, label %fail, label %pass13 14fail:                                             ; preds = %top15  br label %pass16 17pass:                                             ; preds = %fail, %top18  ret void19}20 21; CHECK-LABEL: @test1(22; CHECK:  %[[call:.*]] = call ptr %0()23; CHECK:  fence syncscope("singlethread") seq_cst24; CHECK:  load i32, ptr %[[call]], align 425; CHECK:  fence syncscope("singlethread") seq_cst26 27 28attributes #0 = { nounwind readnone }29