blob: 0cae5c4f2888ffa23df4eb2ef0bac2e0ceb331a8 [file] [log] [blame]
Dan Gohman40503392009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu > %t
Rafael Espindola000421e2009-02-27 13:37:18 +00002; RUN: grep {movl %gs:i@NTPOFF, %eax} %t
Dan Gohman40503392009-09-08 23:54:48 +00003; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu > %t2
Rafael Espindola6d6c6042009-04-13 13:02:49 +00004; RUN: grep {movl %fs:i@TPOFF, %eax} %t2
Lauro Ramos Venanciofe6e3f42007-04-23 01:29:35 +00005
Rafael Espindola000421e2009-02-27 13:37:18 +00006@i = thread_local global i32 15
Lauro Ramos Venanciofe6e3f42007-04-23 01:29:35 +00007
Chris Lattnerfbc97782009-06-20 19:43:09 +00008define i32 @f() nounwind {
Lauro Ramos Venanciofe6e3f42007-04-23 01:29:35 +00009entry:
Rafael Espindola000421e2009-02-27 13:37:18 +000010 %tmp1 = load i32* @i
Lauro Ramos Venanciofe6e3f42007-04-23 01:29:35 +000011 ret i32 %tmp1
12}