2011-09-23 07:41:28 +08:00
|
|
|
; RUN: llc < %s -march=x86 -relocation-model=pic -mtriple=i686-unknown-linux-gnu -fast-isel | FileCheck %s
|
2009-02-24 06:03:08 +08:00
|
|
|
; PR3654
|
|
|
|
|
|
|
|
@v = thread_local global i32 0
|
|
|
|
define i32 @f() nounwind {
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%t = load i32, i32* @v
|
2009-02-24 06:03:08 +08:00
|
|
|
%s = add i32 %t, 1
|
|
|
|
ret i32 %s
|
|
|
|
}
|
2011-09-23 07:41:28 +08:00
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f:
|
2011-09-23 07:41:28 +08:00
|
|
|
; CHECK: leal v@TLSGD
|
|
|
|
; CHECK: __tls_get_addr
|
|
|
|
|
2015-09-11 11:22:04 +08:00
|
|
|
@alias = internal alias i32, i32* @v
|
2011-09-23 07:41:28 +08:00
|
|
|
define i32 @f_alias() nounwind {
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%t = load i32, i32* @v
|
2011-09-23 07:41:28 +08:00
|
|
|
%s = add i32 %t, 1
|
|
|
|
ret i32 %s
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: f_alias:
|
2011-09-23 07:41:28 +08:00
|
|
|
; CHECK: leal v@TLSGD
|
|
|
|
; CHECK: __tls_get_addr
|