summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/stackpointer.ll
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2014-05-20 17:40:03 +0000
committerRenato Golin <renato.golin@linaro.org>2014-05-20 17:40:03 +0000
commite919fcac05f3b2b62a801c40dcf37597e2479d69 (patch)
tree9ca1bb8e65cbe011278ff95f07906039fe55e5cd /llvm/test/CodeGen/X86/stackpointer.ll
parent7afd71e4ff5d13fdea68cd1261a96b19488d39db (diff)
downloadbcm5719-llvm-e919fcac05f3b2b62a801c40dcf37597e2479d69.tar.gz
bcm5719-llvm-e919fcac05f3b2b62a801c40dcf37597e2479d69.zip
Avoids DCE on write_register
llvm-svn: 209222
Diffstat (limited to 'llvm/test/CodeGen/X86/stackpointer.ll')
-rw-r--r--llvm/test/CodeGen/X86/stackpointer.ll3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/stackpointer.ll b/llvm/test/CodeGen/X86/stackpointer.ll
index 26f9999fd5d..80bcfbf1674 100644
--- a/llvm/test/CodeGen/X86/stackpointer.ll
+++ b/llvm/test/CodeGen/X86/stackpointer.ll
@@ -1,11 +1,13 @@
; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-linux-gnueabi | FileCheck %s
+; RUN: opt < %s -O3 -S -mtriple=x86_64-linux-gnueabi | FileCheck %s --check-prefix=OPT
define i64 @get_stack() nounwind {
entry:
; CHECK-LABEL: get_stack:
; CHECK: movq %rsp, %rax
%sp = call i64 @llvm.read_register.i64(metadata !0)
+; OPT: @llvm.read_register.i64
ret i64 %sp
}
@@ -14,6 +16,7 @@ entry:
; CHECK-LABEL: set_stack:
; CHECK: movq %rdi, %rsp
call void @llvm.write_register.i64(metadata !0, i64 %val)
+; OPT: @llvm.write_register.i64
ret void
}
OpenPOWER on IntegriCloud