Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / Instrumentation / AddressSanitizer / X86 / asm_swap_intel.s
blob9743d83e471e505d233fafbb5f36875f42958ad4
1 # RUN: llvm-mc %s -x86-asm-syntax=intel -triple=x86_64-unknown-linux-gnu -asm-instrumentation=address -asan-instrument-assembly | FileCheck %s
3 .text
4 .globl swap
5 .align 16, 0x90
6 .type swap,@function
7 # CHECK-LABEL: swap:
9 # CHECK: leaq -128(%rsp), %rsp
10 # CHECK: callq __asan_report_load8@PLT
11 # CHECK: leaq 128(%rsp), %rsp
13 # CHECK: movq (%rcx), %rax
15 # CHECK: leaq -128(%rsp), %rsp
16 # CHECK: callq __asan_report_load8@PLT
17 # CHECK: leaq 128(%rsp), %rsp
19 # CHECK: movq (%rdx), %rbx
21 # CHECK: leaq -128(%rsp), %rsp
22 # CHECK: callq __asan_report_store8@PLT
23 # CHECK: leaq 128(%rsp), %rsp
25 # CHECK: movq %rbx, (%rcx)
27 # CHECK: leaq -128(%rsp), %rsp
28 # CHECK: callq __asan_report_store8@PLT
29 # CHECK: leaq 128(%rsp), %rsp
31 # CHECK: movq %rax, (%rdx)
32 swap: # @swap
33 .cfi_startproc
34 # %bb.0:
35 push rbx
36 .Ltmp0:
37 .cfi_def_cfa_offset 16
38 .Ltmp1:
39 .cfi_offset rbx, -16
40 mov rcx, rdi
41 mov rdx, rsi
42 #APP
45 mov rax, qword ptr [rcx]
46 mov rbx, qword ptr [rdx]
47 mov qword ptr [rcx], rbx
48 mov qword ptr [rdx], rax
50 #NO_APP
51 pop rbx
52 ret
53 .Ltmp2:
54 .size swap, .Ltmp2-swap
55 .cfi_endproc
58 .ident "clang version 3.5.0 "
59 .section ".note.GNU-stack","",@progbits