Ulrich Weigand | 7db6918 | 2015-02-18 09:13:27 +0000 | [diff] [blame] | 1 | ; Test initial-exec TLS accesses. |
| 2 | ; |
| 3 | ; RUN: llc < %s -mcpu=z10 -mtriple=s390x-linux-gnu -relocation-model=pic | FileCheck %s -check-prefix=CHECK-MAIN |
| 4 | |
| 5 | @x = thread_local(initialexec) global i32 0 |
| 6 | |
| 7 | ; The offset must be loaded from the GOT. This TLS access model does |
| 8 | ; not use literal pool constants. |
| 9 | define i32 *@foo() { |
| 10 | ; CHECK-MAIN-LABEL: foo: |
| 11 | ; CHECK-MAIN: ear [[HIGH:%r[0-5]]], %a0 |
| 12 | ; CHECK-MAIN: sllg %r2, [[HIGH]], 32 |
Jonas Paulsson | c63ed22 | 2017-10-06 13:59:28 +0000 | [diff] [blame] | 13 | ; CHECK-MAIN-DAG: ear %r2, %a1 |
| 14 | ; CHECK-MAIN-DAG: larl %r1, x@INDNTPOFF |
Ulrich Weigand | 7db6918 | 2015-02-18 09:13:27 +0000 | [diff] [blame] | 15 | ; CHECK-MAIN: ag %r2, 0(%r1) |
| 16 | ; CHECK-MAIN: br %r14 |
| 17 | ret i32 *@x |
| 18 | } |