xref: /llvm-project/llvm/test/CodeGen/X86/x86-64-tls-1.ll (revision 69bd66b3ced6a295b302c6548aba11d7734c2cd7)
1; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
2@tm_nest_level = internal thread_local global i32 0
3define i64 @z() nounwind {
4; CHECK:      movq    $tm_nest_level@TPOFF, %r[[R0:[abcd]]]x
5; CHECK-NEXT: addl    %fs:0, %e[[R0]]x
6; CHECK-NEXT: andl    $100, %e[[R0]]x
7
8  %and = and i64 ptrtoint (ptr @tm_nest_level to i64), 100
9  ret i64 %and
10}
11