summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/tailcall-readnone.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/tailcall-readnone.ll')
-rw-r--r--test/CodeGen/X86/tailcall-readnone.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/tailcall-readnone.ll b/test/CodeGen/X86/tailcall-readnone.ll
new file mode 100644
index 0000000000000..b43f69120e7c2
--- /dev/null
+++ b/test/CodeGen/X86/tailcall-readnone.ll
@@ -0,0 +1,15 @@
+; RUN: llc -mtriple=x86_64-unknown-linux-gnu -o - %s | FileCheck %s
+
+define void @f(i32** %p) unnamed_addr {
+entry:
+ %v = tail call i32* @g()
+ store i32* %v, i32** %p, align 8
+ ret void
+}
+; CHECK-LABEL: f:
+; CHECK: callq g
+; CHECK: movq %rax, (%rbx)
+
+declare i32* @g() #2
+
+attributes #2 = { nounwind readnone }