Add a triple to switch.ll test.
[oota-llvm.git] / test / CodeGen / X86 / pr22103.ll
1 ; RUN: llc < %s | FileCheck %s
2 ; Don't try to emit a direct call through a TLS global.
3 ; This fixes PR22103
4
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-unknown-linux-gnu"
7
8 @a = external thread_local global i64
9
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]]
16 entry:
17   call void bitcast (i64* @a to void ()*)()
18   ret void
19 }