aboutsummaryrefslogtreecommitdiffstats
path: root/test/Instrumentation/AddressSanitizer/X86/asm_attr.ll
blob: b83a7e90f363c0b9a63db93b2a4e8a081269ca47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address -asan-instrument-assembly | FileCheck %s

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; CHECK-LABEL: mov_no_attr
; CHECK-NOT: callq __sanitizer_sanitize_load8@PLT
; CHECK-NOT: callq __sanitizer_sanitize_store8@PLT
define void @mov_no_attr(i64* %dst, i64* %src) {
  tail call void asm sideeffect "movq ($1), %rax  \0A\09movq %rax, ($0)  \0A\09", "r,r,~{memory},~{rax},~{dirflag},~{fpsr},~{flags}"(i64* %dst, i64* %src)
  ret void
}

; CHECK-LABEL: mov_sanitize
; CHECK: callq __sanitizer_sanitize_load8@PLT
; CHECK: callq __sanitizer_sanitize_store8@PLT
define void @mov_sanitize(i64* %dst, i64* %src) sanitize_address {
  tail call void asm sideeffect "movq ($1), %rax  \0A\09movq %rax, ($0)  \0A\09", "r,r,~{memory},~{rax},~{dirflag},~{fpsr},~{flags}"(i64* %dst, i64* %src)
  ret void
}