blob: f94f88a1183fe21b19c6e7590c967b4510c6b219 [file] [log] [blame]
Tim Northover00ed9962014-03-29 10:18:08 +00001; 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
10define i32 @test_generaldynamic() {
11; CHECK-LABEL: test_generaldynamic:
12
David Blaikiea79ac142015-02-27 21:17:42 +000013 %val = load i32, i32* @general_dynamic_var
Tim Northover00ed9962014-03-29 10:18:08 +000014 ret i32 %val
15
16; CHECK: .tlsdesccall general_dynamic_var
17; CHECK-NEXT: blr {{x[0-9]+}}
18}