Dan Gohman | 0a06310 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu > %t |
Rafael Espindola | 7682b9c | 2009-04-10 10:09:34 +0000 | [diff] [blame] | 2 | ; RUN: grep {movl %gs:0, %eax} %t | count 1 |
| 3 | ; RUN: grep {leal i@NTPOFF(%eax), %ecx} %t |
| 4 | ; RUN: grep {leal j@NTPOFF(%eax), %eax} %t |
Dan Gohman | 0a06310 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 5 | ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu > %t2 |
Rafael Espindola | b93a512 | 2009-04-13 13:02:49 +0000 | [diff] [blame] | 6 | ; RUN: grep {movq %fs:0, %rax} %t2 | count 1 |
| 7 | ; RUN: grep {leaq i@TPOFF(%rax), %rcx} %t2 |
| 8 | ; RUN: grep {leaq j@TPOFF(%rax), %rax} %t2 |
Rafael Espindola | 7682b9c | 2009-04-10 10:09:34 +0000 | [diff] [blame] | 9 | |
| 10 | @i = thread_local global i32 0 |
| 11 | @j = thread_local global i32 0 |
| 12 | |
| 13 | define void @f(i32** %a, i32** %b) { |
| 14 | entry: |
| 15 | store i32* @i, i32** %a, align 8 |
| 16 | store i32* @j, i32** %b, align 8 |
| 17 | ret void |
| 18 | } |