[WinEH] Disable most forms of demotion
Now that the register allocator knows about the barriers on funclet
entry and exit, testing has shown that this is unnecessary.
We still demote PHIs on unsplittable blocks due to the differences
between the IR CFG and the Machine CFG.
llvm-svn: 253619
diff --git a/llvm/test/CodeGen/X86/win-catchpad-varargs.ll b/llvm/test/CodeGen/X86/win-catchpad-varargs.ll
index 03c6c70..a2988a3 100644
--- a/llvm/test/CodeGen/X86/win-catchpad-varargs.ll
+++ b/llvm/test/CodeGen/X86/win-catchpad-varargs.ll
@@ -35,40 +35,34 @@
; X64-LABEL: .seh_proc f
; X64: pushq %rbp
-; X64: pushq %rsi
-; X64: subq $56, %rsp
-; X64: leaq 48(%rsp), %rbp
-; X64: movq $-2, (%rbp)
+; X64: subq $64, %rsp
+; X64: leaq 64(%rsp), %rbp
+; X64: movq $-2, -8(%rbp)
+; X64: movl $-1, -20(%rbp) # 4-byte Folded Spill
; X64: callq g
-; X64: movl %esi, %eax
-; X64: addq $56, %rsp
-; X64: popq %rsi
+; X64: .LBB0_1
+; X64: movl -20(%rbp), %eax # 4-byte Reload
+; X64: addq $64, %rsp
; X64: popq %rbp
-; X64: movl -4(%rbp), %esi
-; X64: jmp
-
-; X64-LABEL: "?catch$1@?0?f@4HA":
-; X64: .seh_proc "?catch$1@?0?f@4HA"
+; X64-LABEL: "?catch${{[0-9]}}@?0?f@4HA":
+; X64: .seh_proc "?catch${{[0-9]}}@?0?f@4HA"
; X64: movq %rdx, 16(%rsp)
; X64: pushq %rbp
-; X64: pushq %rsi
-; X64: subq $40, %rsp
-; X64: leaq 48(%rdx), %rbp
+; X64: subq $32, %rsp
+; X64: leaq 64(%rdx), %rbp
; arg2 is at RBP+40:
; start at arg2
; + 8 for arg1
; + 8 for retaddr
; + 8 for RBP
-; + 8 for RSI
-; + 56 for stackalloc
-; - 48 for setframe
+; + 64 for stackalloc
+; - 64 for setframe
; = 40
-; X64: movl 40(%rbp), %eax
-; X64: movl %eax, -4(%rbp)
-; X64: leaq .LBB0_2(%rip), %rax
-; X64: addq $40, %rsp
-; X64: popq %rsi
+; X64: movl 24(%rbp), %eax
+; X64: movl %eax, -20(%rbp) # 4-byte Spill
+; X64: leaq .LBB0_1(%rip), %rax
+; X64: addq $32, %rsp
; X64: popq %rbp
; X64: retq # CATCHRET
@@ -78,27 +72,33 @@
; X86: pushl %ebx
; X86: pushl %edi
; X86: pushl %esi
-; X86: subl $28, %esp
-; X86: movl $-1, -40(%ebp)
+; X86: subl $24, %esp
+; X86: movl $-1, -36(%ebp)
; X86: calll _g
-; X86: movl -40(%ebp), %eax
-; X86: addl $28, %esp
+; X86: LBB0_[[retbb:[0-9]+]]:
+; X86: movl -36(%ebp), %eax
+; X86: addl $24, %esp
; X86: popl %esi
; X86: popl %edi
; X86: popl %ebx
; X86: popl %ebp
; X86: retl
-; X86-LABEL: "?catch$1@?0?f@4HA":
-; X86: pushl %ebp
-; X86: addl $12, %ebp
+; X86: LBB0_[[restorebb:[0-9]+]]: # Block address taken
+; X86: addl $12, %ebp
; arg2 is at EBP offset 12:
; + 4 for arg1
; + 4 for retaddr
; + 4 for EBP
+; X86: movl 12(%ebp), %eax
+; X86: movl %eax, -36(%ebp)
+; X86: jmp LBB0_[[retbb]]
+
+; X86-LABEL: "?catch${{[0-9]}}@?0?f@4HA":
+; X86: pushl %ebp
+; X86: addl $12, %ebp
; Done due to mov %esp, %ebp
-; X86: movl 12(%ebp), %eax
-; X86: movl %eax, -32(%ebp)
-; X86: movl $LBB0_2, %eax
+; X86: leal 12(%ebp), %eax
+; X86: movl $LBB0_[[restorebb]], %eax
; X86: popl %ebp
; X86: retl # CATCHRET