Fixes an issue reported by -verify-machineinstrs.
Patch by Sanjoy Das.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143064 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/X86/segmented-stacks.ll b/test/CodeGen/X86/segmented-stacks.ll
index 3f0067e..4871daa 100644
--- a/test/CodeGen/X86/segmented-stacks.ll
+++ b/test/CodeGen/X86/segmented-stacks.ll
@@ -30,6 +30,10 @@
; X32-NEXT: addl $8, %esp
; X32-NEXT: ret
+; X32: movl %esp, %eax
+; X32-NEXT: subl %ecx, %eax
+; X32-NEXT: cmpl %eax, %gs:48
+
; X32: movl %eax, %esp
; X32: subl $12, %esp
@@ -47,14 +51,15 @@
; X64-NEXT: callq __morestack
; X64-NEXT: ret
-; X64: movq %rsp, %rax
-; X64-NEXT: subq %rcx, %rax
-; X64-NEXT: cmpq %rax, %fs:112
+; X64: movq %rsp, %rdi
+; X64-NEXT: subq %rax, %rdi
+; X64-NEXT: cmpq %rdi, %fs:112
-; X64: movq %rax, %rsp
+; X64: movq %rdi, %rsp
-; X64: movq %rcx, %rdi
+; X64: movq %rax, %rdi
; X64-NEXT: callq __morestack_allocate_stack_space
+; X64-NEXT: movq %rax, %rdi
}