blob: ec23a41113eef8bd87f382c08768d9c6b12596fc [file] [log] [blame]
Rafael Espindola9b922aa2009-03-13 18:37:06 +00001; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
2; RUN: grep {movswl %gs:i@NTPOFF, %eax} %t
3; RUN: grep {movzwl %gs:j@NTPOFF, %eax} %t
Rafael Espindola7ff5bff2009-04-13 13:02:49 +00004; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu > %t2
5; 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)