summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/pr156817.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/pr156817.ll')
-rw-r--r--llvm/test/CodeGen/X86/pr156817.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr156817.ll b/llvm/test/CodeGen/X86/pr156817.ll
new file mode 100644
index 000000000000..80972ecc5abb
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr156817.ll
@@ -0,0 +1,23 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=x86_64 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64 -mattr=+egpr | FileCheck %s --check-prefix=EGPR
+
+define coldcc i32 @foo() nounwind {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0:
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq bar@PLT
+; CHECK-NEXT: addq $8, %rsp
+; CHECK-NEXT: retq
+;
+; EGPR-LABEL: foo:
+; EGPR: # %bb.0:
+; EGPR-NEXT: pushq %rax
+; EGPR-NEXT: callq bar@PLT
+; EGPR-NEXT: popq %r16
+; EGPR-NEXT: retq
+ %1 = tail call coldcc i32 @bar()
+ ret i32 %1
+}
+
+declare coldcc i32 @bar()