blob: 08778ec2ce8b1aea2b2093d26c45e91321ae4add [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu > %t
Rafael Espindola9b922aa2009-03-13 18:37:06 +00002; RUN: grep {movswl %gs:i@NTPOFF, %eax} %t
3; RUN: grep {movzwl %gs:j@NTPOFF, %eax} %t
Dan Gohman36a09472009-09-08 23:54:48 +00004; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu > %t2
Rafael Espindola7ff5bff2009-04-13 13:02:49 +00005; RUN: grep {movswl %fs:i@TPOFF, %edi} %t2
6; RUN: grep {movzwl %fs:j@TPOFF, %edi} %t2
Rafael Espindola9b922aa2009-03-13 18:37:06 +00007
8@i = thread_local global i16 0
9@j = thread_local global i16 0
10
11define void @f() nounwind optsize {
12entry:
13 %0 = load i16* @i, align 2
14 %1 = sext i16 %0 to i32
15 tail call void @g(i32 %1) nounwind
16 %2 = load i16* @j, align 2
17 %3 = zext i16 %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)