Tim Northover | 00ed996 | 2014-03-29 10:18:08 +0000 | [diff] [blame] | 1 | ; RUN: llc -O0 -mtriple=arm64-none-linux-gnu -relocation-model=pic -verify-machineinstrs < %s | FileCheck %s |
| 2 | |
| 3 | ; If the .tlsdesccall and blr parts are emitted completely separately (even with |
| 4 | ; glue) then LLVM will separate them quite happily (with a spill at O0, hence |
| 5 | ; the option). This is definitely wrong, so we make sure they are emitted |
| 6 | ; together. |
| 7 | |
| 8 | @general_dynamic_var = external thread_local global i32 |
| 9 | |
| 10 | define i32 @test_generaldynamic() { |
| 11 | ; CHECK-LABEL: test_generaldynamic: |
| 12 | |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame^] | 13 | %val = load i32, i32* @general_dynamic_var |
Tim Northover | 00ed996 | 2014-03-29 10:18:08 +0000 | [diff] [blame] | 14 | ret i32 %val |
| 15 | |
| 16 | ; CHECK: .tlsdesccall general_dynamic_var |
| 17 | ; CHECK-NEXT: blr {{x[0-9]+}} |
| 18 | } |