1 ; RUN: llc < %s -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
4 ; RUN: llc < %s -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
8 @i = thread_local global i16 0
9 @j = thread_local global i16 0
11 define void @f() nounwind optsize {
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