brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 9b6ab52 Raw
31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=x86_64 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s3 4; Passing a pointer to thread-local storage to a function can be problematic5; since computing such addresses requires a function call that is introduced6; very late in instruction selection. We need to ensure that we don't introduce7; nested call sequence markers if this function call happens in a call sequence.8 9@TLS = internal thread_local global i64 zeroinitializer, align 810declare void @bar(ptr)11define internal void @foo() {12; CHECK-LABEL: foo:13; CHECK:       # %bb.0:14; CHECK-NEXT:    pushq %rbx15; CHECK-NEXT:    .cfi_def_cfa_offset 1616; CHECK-NEXT:    .cfi_offset %rbx, -1617; CHECK-NEXT:    leaq TLS@TLSLD(%rip), %rdi18; CHECK-NEXT:    callq __tls_get_addr@PLT19; CHECK-NEXT:    leaq TLS@DTPOFF(%rax), %rbx20; CHECK-NEXT:    movq %rbx, %rdi21; CHECK-NEXT:    callq bar@PLT22; CHECK-NEXT:    movq %rbx, %rdi23; CHECK-NEXT:    callq bar@PLT24; CHECK-NEXT:    popq %rbx25; CHECK-NEXT:    .cfi_def_cfa_offset 826; CHECK-NEXT:    retq27  call void @bar(ptr @TLS)28  call void @bar(ptr @TLS)29  ret void30}31