• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -relocation-model pic < %s | FileCheck %s
2target 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 4
6
7define void @x3() #0 {
8entry:
9  %0 = load i32, i32* @x1, align 4
10  %cond = icmp eq i32 %0, 92
11  br i1 %cond, label %sw.bb, label %sw.epilog
12
13sw.bb:                                            ; preds = %entry
14  call void @x2(i8* null)
15  unreachable
16
17sw.epilog:                                        ; preds = %entry
18  ret void
19}
20
21declare void @x2(i8*)
22
23attributes #0 = { optsize }
24
25; CHECK-LABEL: x3:
26; CHECK:         addl    $_GLOBAL_OFFSET_TABLE_+(.Ltmp4-.L0$pb), %[[REG:.*]]
27; CHECK-NEXT:    leal    x1@TLSGD(,%[[REG]]), %eax
28; CHECK-NEXT:    calll   ___tls_get_addr@PLT
29; CHECK-NEXT:    cmpl    $92, (%eax)
30