1 ; RUN: llc < %s | FileCheck %s
2 ; Don't try to emit a direct call through a TLS global.
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-unknown-linux-gnu"
8 @a = external thread_local global i64
10 ; Function Attrs: nounwind
11 define void @_Z1fv() {
12 ; CHECK-NOT: callq *$a
13 ; CHECK: movq %fs:0, [[RAX:%r..]]
14 ; CHECK-NEXT: addq a@GOTTPOFF(%rip), [[RAX]]
15 ; CHECK-NEXT: callq *[[RAX]]
17 call void bitcast (i64* @a to void ()*)()