• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address -asan-instrument-assembly | FileCheck %s
2
3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-unknown-linux-gnu"
5
6; CHECK-LABEL: mov8b_rbp
7; CHECK: pushq %rbp
8; CHECK-NOT: .cfi_adjust_cfa_offset 8
9; CHECK: movq %rbp, %rbp
10; CHECK: .cfi_remember_state
11; CHECK: .cfi_def_cfa_register %rbp
12; CHECK: leaq -128(%rsp)
13; CHECK: callq __asan_report_load8@PLT
14; CHECK: leaq 128(%rsp)
15; CHECK: popq %rbp
16; CHECK: .cfi_restore_state
17; CHECK-NOT: .cfi_adjust_cfa_offset -8
18; CHECK: retq
19define void @mov8b_rbp(i64* %dst, i64* %src) #0 {
20entry:
21  tail call void asm sideeffect "movq ($0), %rax \0A\09movq %rax, ($1) \0A\09", "r,r,~{rax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* %src, i64* %dst)
22  ret void
23}
24
25; CHECK-LABEL: mov8b_rsp
26; CHECK: pushq %rbp
27; CHECK: .cfi_adjust_cfa_offset 8
28; CHECK: movq %rsp, %rbp
29; CHECK: .cfi_remember_state
30; CHECK: .cfi_def_cfa_register %rbp
31; CHECK: leaq -128(%rsp)
32; CHECK: callq __asan_report_load8@PLT
33; CHECK: leaq 128(%rsp)
34; CHECK: popq %rbp
35; CHECK: .cfi_restore_state
36; CHECK: .cfi_adjust_cfa_offset -8
37; CHECK: retq
38define void @mov8b_rsp(i64* %dst, i64* %src) #1 {
39entry:
40  tail call void asm sideeffect "movq ($0), %rax \0A\09movq %rax, ($1) \0A\09", "r,r,~{rax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* %src, i64* %dst)
41  ret void
42}
43
44; CHECK-LABEL: mov8b_rsp_no_cfi
45; CHECK-NOT: .cfi{{[a-z_]+}}
46define void @mov8b_rsp_no_cfi(i64* %dst, i64* %src) #2 {
47entry:
48  tail call void asm sideeffect "movq ($0), %rax \0A\09movq %rax, ($1) \0A\09", "r,r,~{rax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* %src, i64* %dst)
49  ret void
50}
51
52attributes #0 = { nounwind sanitize_address uwtable "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" }
53attributes #1 = { nounwind sanitize_address uwtable "no-frame-pointer-elim"="false" }
54attributes #2 = { nounwind sanitize_address "no-frame-pointer-elim"="false" }
55