Create MCTargetOptions.
[oota-llvm.git] / test / Instrumentation / AddressSanitizer / X86 / asm_attr.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address | FileCheck %s
2
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
5
6 ; CHECK-LABEL: mov_no_attr
7 ; CHECK-NOT: callq __sanitizer_sanitize_load8@PLT
8 ; CHECK-NOT: callq __sanitizer_sanitize_store8@PLT
9 define void @mov_no_attr(i64* %dst, i64* %src) {
10   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)
11   ret void
12 }
13
14 ; CHECK-LABEL: mov_sanitize
15 ; CHECK: callq __sanitizer_sanitize_load8@PLT
16 ; CHECK: callq __sanitizer_sanitize_store8@PLT
17 define void @mov_sanitize(i64* %dst, i64* %src) sanitize_address {
18   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)
19   ret void
20 }