blob: 941601eb4f9b6b3cc46e2bde6f5cf7031ad38cbf [file] [log] [blame]
Rafael Espindola24e7e312009-03-13 18:37:06 +00001; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
2; RUN: grep {movsbl %gs:i@NTPOFF, %eax} %t
3; RUN: grep {movzbl %gs:j@NTPOFF, %eax} %t
Rafael Espindolab93a5122009-04-13 13:02:49 +00004; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu > %t2
5; RUN: grep {movsbl %fs:i@TPOFF, %edi} %t2
6; RUN: grep {movzbl %fs:j@TPOFF, %edi} %t2
Rafael Espindola24e7e312009-03-13 18:37:06 +00007
8@i = thread_local global i8 0
9@j = thread_local global i8 0
10
11define void @f() nounwind optsize {
12entry:
13 %0 = load i8* @i, align 2
14 %1 = sext i8 %0 to i32
15 tail call void @g(i32 %1) nounwind
16 %2 = load i8* @j, align 2
17 %3 = zext i8 %2 to i32
18 tail call void @h(i32 %3) nounwind
19 ret void
20}
21
22declare void @g(i32)
23
24declare void @h(i32)