brintos

brintos / llvm-project-archived public Read only

0
0
Text · 819 B · a7bac0a Raw
30 lines · plain
1; RUN: llc -relocation-model pic < %s | FileCheck %s2target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"3target triple = "i386-unknown-freebsd"4 5@x1 = external thread_local global i32, align 46 7define void @x3() #0 {8entry:9  %0 = load i32, ptr @x1, align 410  %cond = icmp eq i32 %0, 9211  br i1 %cond, label %sw.bb, label %sw.epilog12 13sw.bb:                                            ; preds = %entry14  call void @x2(ptr null)15  unreachable16 17sw.epilog:                                        ; preds = %entry18  ret void19}20 21declare void @x2(ptr)22 23attributes #0 = { optsize }24 25; CHECK-LABEL: x3:26; CHECK:         addl    $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %[[REG:.*]]27; CHECK-NEXT:    leal    x1@TLSGD(,%[[REG]]), %eax28; CHECK-NEXT:    calll   ___tls_get_addr@PLT29; CHECK-NEXT:    cmpl    $92, (%eax)30