Skip to content

Commit c137b3e

Browse files
[X86] Introduce test for PR112098 (NFC)
1 parent 488d392 commit c137b3e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc < %s -mtriple=x86_64-linux-gnu -mattr=-sse,-avx | FileCheck %s
3+
4+
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
5+
6+
define void @caller(i32 %0, i32 %1) #0 {
7+
; CHECK-LABEL: caller:
8+
; CHECK: # %bb.0:
9+
; CHECK-NEXT: pushq %r11
10+
; CHECK-NEXT: pushq %r10
11+
; CHECK-NEXT: pushq %r9
12+
; CHECK-NEXT: pushq %r8
13+
; CHECK-NEXT: pushq %rdx
14+
; CHECK-NEXT: pushq %rcx
15+
; CHECK-NEXT: pushq %rax
16+
; CHECK-NEXT: movl %edi, %esi
17+
; CHECK-NEXT: movl $.L.str, %edi
18+
; CHECK-NEXT: popq %rax
19+
; CHECK-NEXT: popq %rcx
20+
; CHECK-NEXT: popq %rdx
21+
; CHECK-NEXT: popq %r8
22+
; CHECK-NEXT: popq %r9
23+
; CHECK-NEXT: popq %r10
24+
; CHECK-NEXT: popq %r11
25+
; CHECK-NEXT: jmp printf@PLT # TAILCALL
26+
%3 = tail call i32 @printf(ptr @.str, i32 %0, i32 %1)
27+
ret void
28+
}
29+
30+
declare i32 @printf(ptr, ...) nounwind
31+
32+
attributes #0 = { mustprogress nounwind "no_caller_saved_registers" }

0 commit comments

Comments
 (0)