1 ; RUN: llc -relocation-model pic < %s | FileCheck %s
2 target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
3 target triple = "i386-unknown-freebsd"
5 @x1 = external thread_local global i32, align 4
9 %0 = load i32, ptr @x1, align 4
10 %cond = icmp eq i32 %0, 92
11 br i1 %cond, label %sw.bb, label %sw.epilog
13 sw.bb: ; preds = %entry
14 call void @x2(ptr null)
17 sw.epilog: ; preds = %entry
23 attributes #0 = { optsize }
26 ; CHECK: addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.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)