[X86] improve split-stack machine BB placement

Summary:
The conditional branch created to support -fsplit-stack for X86 is
left unbiased/unhinted, resulting in less than ideal block placement:
the __morestack call block is kept on the main hot path. Bias the
branch to insure that the stack allocation block is treated as a
"cold" block during machine basic block placement.

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D54123

llvm-svn: 346336
This commit is contained in:
Than McIntosh 2018-11-07 17:41:57 +00:00
parent ac86038b40
commit 5bcdea5118
4 changed files with 83 additions and 82 deletions

View File

@ -2471,8 +2471,8 @@ void X86FrameLowering::adjustForSegmentedStacks(
allocMBB->addSuccessor(&PrologueMBB);
checkMBB->addSuccessor(allocMBB);
checkMBB->addSuccessor(&PrologueMBB);
checkMBB->addSuccessor(allocMBB, BranchProbability::getZero());
checkMBB->addSuccessor(&PrologueMBB, BranchProbability::getOne());
#ifdef EXPENSIVE_CHECKS
MF.verify();

View File

@ -25,12 +25,7 @@ false:
; X32-LABEL: test_basic:
; X32: cmpl %gs:48, %esp
; X32-NEXT: ja .LBB0_2
; X32: pushl $4
; X32-NEXT: pushl $12
; X32-NEXT: calll __morestack
; X32-NEXT: ret
; X32-NEXT: jbe .LBB0_1
; X32: movl %esp, %eax
; X32: subl %ecx, %eax
@ -43,15 +38,15 @@ false:
; X32-NEXT: calll __morestack_allocate_stack_space
; X32-NEXT: addl $16, %esp
; X32: pushl $4
; X32-NEXT: pushl $12
; X32-NEXT: calll __morestack
; X32-NEXT: ret
; X64-LABEL: test_basic:
; X64: cmpq %fs:112, %rsp
; X64-NEXT: ja .LBB0_2
; X64: movabsq $24, %r10
; X64-NEXT: movabsq $0, %r11
; X64-NEXT: callq __morestack
; X64-NEXT: ret
; X64-NEXT: jbe .LBB0_1
; X64: movq %rsp, %[[RDI:rdi|rax]]
; X64: subq %{{.*}}, %[[RDI]]
@ -63,15 +58,15 @@ false:
; X64-NEXT: callq __morestack_allocate_stack_space
; X64: movq %rax, %rdi
; X64: movabsq $24, %r10
; X64-NEXT: movabsq $0, %r11
; X64-NEXT: callq __morestack
; X64-NEXT: ret
; X32ABI-LABEL: test_basic:
; X32ABI: cmpl %fs:64, %esp
; X32ABI-NEXT: ja .LBB0_2
; X32ABI: movl $24, %r10d
; X32ABI-NEXT: movl $0, %r11d
; X32ABI-NEXT: callq __morestack
; X32ABI-NEXT: ret
; X32ABI-NEXT: jbe .LBB0_1
; X32ABI: movl %esp, %[[EDI:edi|eax]]
; X32ABI: subl %{{.*}}, %[[EDI]]
@ -83,6 +78,11 @@ false:
; X32ABI-NEXT: callq __morestack_allocate_stack_space
; X32ABI: movl %eax, %edi
; X32ABI: movl $24, %r10d
; X32ABI-NEXT: movl $0, %r11d
; X32ABI-NEXT: callq __morestack
; X32ABI-NEXT: ret
}
attributes #0 = { "split-stack" }

View File

@ -41,7 +41,7 @@ define void @test_basic() #0 {
; X32-Linux-LABEL: test_basic:
; X32-Linux: cmpl %gs:48, %esp
; X32-Linux-NEXT: ja .LBB0_2
; X32-Linux-NEXT: jbe .LBB0_1
; X32-Linux: pushl $0
; X32-Linux-NEXT: pushl $44
@ -51,7 +51,7 @@ define void @test_basic() #0 {
; X64-Linux-LABEL: test_basic:
; X64-Linux: cmpq %fs:112, %rsp
; X64-Linux-NEXT: ja .LBB0_2
; X64-Linux-NEXT: jbe .LBB0_1
; X64-Linux: movabsq $40, %r10
; X64-Linux-NEXT: movabsq $0, %r11
@ -61,7 +61,7 @@ define void @test_basic() #0 {
; X64-Linux-Large-LABEL: test_basic:
; X64-Linux-Large: cmpq %fs:112, %rsp
; X64-Linux-Large-NEXT: ja .LBB0_2
; X64-Linux-Large-NEXT: jbe .LBB0_1
; X64-Linux-Large: movabsq $40, %r10
; X64-Linux-Large-NEXT: movabsq $0, %r11
@ -71,7 +71,7 @@ define void @test_basic() #0 {
; X32ABI-LABEL: test_basic:
; X32ABI: cmpl %fs:64, %esp
; X32ABI-NEXT: ja .LBB0_2
; X32ABI-NEXT: jbe .LBB0_1
; X32ABI: movl $40, %r10d
; X32ABI-NEXT: movl $0, %r11d
@ -82,7 +82,7 @@ define void @test_basic() #0 {
; X32-Darwin: movl $432, %ecx
; X32-Darwin-NEXT: cmpl %gs:(%ecx), %esp
; X32-Darwin-NEXT: ja LBB0_2
; X32-Darwin-NEXT: jbe LBB0_1
; X32-Darwin: pushl $0
; X32-Darwin-NEXT: pushl $60
@ -92,7 +92,7 @@ define void @test_basic() #0 {
; X64-Darwin-LABEL: test_basic:
; X64-Darwin: cmpq %gs:816, %rsp
; X64-Darwin-NEXT: ja LBB0_2
; X64-Darwin-NEXT: jbe LBB0_1
; X64-Darwin: movabsq $40, %r10
; X64-Darwin-NEXT: movabsq $0, %r11
@ -102,7 +102,7 @@ define void @test_basic() #0 {
; X32-MinGW-LABEL: test_basic:
; X32-MinGW: cmpl %fs:20, %esp
; X32-MinGW-NEXT: ja LBB0_2
; X32-MinGW-NEXT: jbe LBB0_1
; X32-MinGW: pushl $0
; X32-MinGW-NEXT: pushl $40
@ -112,7 +112,7 @@ define void @test_basic() #0 {
; X64-MinGW-LABEL: test_basic:
; X64-MinGW: cmpq %gs:40, %rsp
; X64-MinGW-NEXT: ja .LBB0_2
; X64-MinGW-NEXT: jbe .LBB0_1
; X64-MinGW: movabsq $72, %r10
; X64-MinGW-NEXT: movabsq $32, %r11
@ -122,7 +122,7 @@ define void @test_basic() #0 {
; X64-FreeBSD-LABEL: test_basic:
; X64-FreeBSD: cmpq %fs:24, %rsp
; X64-FreeBSD-NEXT: ja .LBB0_2
; X64-FreeBSD-NEXT: jbe .LBB0_1
; X64-FreeBSD: movabsq $40, %r10
; X64-FreeBSD-NEXT: movabsq $0, %r11
@ -132,7 +132,7 @@ define void @test_basic() #0 {
; X32-DFlyBSD-LABEL: test_basic:
; X32-DFlyBSD: cmpl %fs:16, %esp
; X32-DFlyBSD-NEXT: ja .LBB0_2
; X32-DFlyBSD-NEXT: jbe .LBB0_1
; X32-DFlyBSD: pushl $0
; X32-DFlyBSD-NEXT: pushl $40
@ -142,7 +142,7 @@ define void @test_basic() #0 {
; X64-DFlyBSD-LABEL: test_basic:
; X64-DFlyBSD: cmpq %fs:32, %rsp
; X64-DFlyBSD-NEXT: ja .LBB0_2
; X64-DFlyBSD-NEXT: jbe .LBB0_1
; X64-DFlyBSD: movabsq $40, %r10
; X64-DFlyBSD-NEXT: movabsq $0, %r11
@ -159,7 +159,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
ret i32 %result
; X32-Linux: cmpl %gs:48, %esp
; X32-Linux-NEXT: ja .LBB1_2
; X32-Linux-NEXT: jbe .LBB1_1
; X32-Linux: pushl $4
; X32-Linux-NEXT: pushl $44
@ -167,7 +167,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X32-Linux-NEXT: ret
; X64-Linux: cmpq %fs:112, %rsp
; X64-Linux-NEXT: ja .LBB1_2
; X64-Linux-NEXT: jbe .LBB1_1
; X64-Linux: movq %r10, %rax
; X64-Linux-NEXT: movabsq $56, %r10
@ -177,7 +177,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X64-Linux-NEXT: movq %rax, %r10
; X32ABI: cmpl %fs:64, %esp
; X32ABI-NEXT: ja .LBB1_2
; X32ABI-NEXT: jbe .LBB1_1
; X32ABI: movl %r10d, %eax
; X32ABI-NEXT: movl $56, %r10d
@ -188,7 +188,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X32-Darwin: movl $432, %edx
; X32-Darwin-NEXT: cmpl %gs:(%edx), %esp
; X32-Darwin-NEXT: ja LBB1_2
; X32-Darwin-NEXT: jbe LBB1_1
; X32-Darwin: pushl $4
; X32-Darwin-NEXT: pushl $60
@ -196,7 +196,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X32-Darwin-NEXT: ret
; X64-Darwin: cmpq %gs:816, %rsp
; X64-Darwin-NEXT: ja LBB1_2
; X64-Darwin-NEXT: jbe LBB1_1
; X64-Darwin: movq %r10, %rax
; X64-Darwin-NEXT: movabsq $56, %r10
@ -206,7 +206,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X64-Darwin-NEXT: movq %rax, %r10
; X32-MinGW: cmpl %fs:20, %esp
; X32-MinGW-NEXT: ja LBB1_2
; X32-MinGW-NEXT: jbe LBB1_1
; X32-MinGW: pushl $4
; X32-MinGW-NEXT: pushl $44
@ -215,7 +215,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X64-MinGW-LABEL: test_nested:
; X64-MinGW: cmpq %gs:40, %rsp
; X64-MinGW-NEXT: ja .LBB1_2
; X64-MinGW-NEXT: jbe .LBB1_1
; X64-MinGW: movq %r10, %rax
; X64-MinGW-NEXT: movabsq $88, %r10
@ -225,7 +225,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X64-MinGW-NEXT: movq %rax, %r10
; X64-FreeBSD: cmpq %fs:24, %rsp
; X64-FreeBSD-NEXT: ja .LBB1_2
; X64-FreeBSD-NEXT: jbe .LBB1_1
; X64-FreeBSD: movq %r10, %rax
; X64-FreeBSD-NEXT: movabsq $56, %r10
@ -235,7 +235,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X64-FreeBSD-NEXT: movq %rax, %r10
; X32-DFlyBSD: cmpl %fs:16, %esp
; X32-DFlyBSD-NEXT: ja .LBB1_2
; X32-DFlyBSD-NEXT: jbe .LBB1_1
; X32-DFlyBSD: pushl $4
; X32-DFlyBSD-NEXT: pushl $44
@ -243,7 +243,7 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
; X32-DFlyBSD-NEXT: ret
; X64-DFlyBSD: cmpq %fs:32, %rsp
; X64-DFlyBSD-NEXT: ja .LBB1_2
; X64-DFlyBSD-NEXT: jbe .LBB1_1
; X64-DFlyBSD: movq %r10, %rax
; X64-DFlyBSD-NEXT: movabsq $56, %r10
@ -256,12 +256,14 @@ define i32 @test_nested(i32 * nest %closure, i32 %other) #0 {
define void @test_large() #0 {
%mem = alloca i32, i32 10000
call void @dummy_use (i32* %mem, i32 0)
call void @dummy_use (i32* %mem, i32 3)
ret void
; X32-Linux-LABEL: test_large:
; X32-Linux: leal -40012(%esp), %ecx
; X32-Linux-NEXT: cmpl %gs:48, %ecx
; X32-Linux-NEXT: ja .LBB2_2
; X32-Linux-NEXT: jbe .LBB2_1
; X32-Linux: pushl $0
; X32-Linux-NEXT: pushl $40012
@ -270,7 +272,7 @@ define void @test_large() #0 {
; X64-Linux: leaq -40008(%rsp), %r11
; X64-Linux-NEXT: cmpq %fs:112, %r11
; X64-Linux-NEXT: ja .LBB2_2
; X64-Linux-NEXT: jbe .LBB2_1
; X64-Linux: movabsq $40008, %r10
; X64-Linux-NEXT: movabsq $0, %r11
@ -279,7 +281,7 @@ define void @test_large() #0 {
; X32ABI: leal -40008(%rsp), %r11d
; X32ABI-NEXT: cmpl %fs:64, %r11d
; X32ABI-NEXT: ja .LBB2_2
; X32ABI-NEXT: jbe .LBB2_1
; X32ABI: movl $40008, %r10d
; X32ABI-NEXT: movl $0, %r11d
@ -289,7 +291,7 @@ define void @test_large() #0 {
; X32-Darwin: leal -40012(%esp), %ecx
; X32-Darwin-NEXT: movl $432, %eax
; X32-Darwin-NEXT: cmpl %gs:(%eax), %ecx
; X32-Darwin-NEXT: ja LBB2_2
; X32-Darwin-NEXT: jbe LBB2_1
; X32-Darwin: pushl $0
; X32-Darwin-NEXT: pushl $40012
@ -298,7 +300,7 @@ define void @test_large() #0 {
; X64-Darwin: leaq -40008(%rsp), %r11
; X64-Darwin-NEXT: cmpq %gs:816, %r11
; X64-Darwin-NEXT: ja LBB2_2
; X64-Darwin-NEXT: jbe LBB2_1
; X64-Darwin: movabsq $40008, %r10
; X64-Darwin-NEXT: movabsq $0, %r11
@ -307,7 +309,7 @@ define void @test_large() #0 {
; X32-MinGW: leal -40000(%esp), %ecx
; X32-MinGW-NEXT: cmpl %fs:20, %ecx
; X32-MinGW-NEXT: ja LBB2_2
; X32-MinGW-NEXT: jbe LBB2_1
; X32-MinGW: pushl $0
; X32-MinGW-NEXT: pushl $40000
@ -317,7 +319,7 @@ define void @test_large() #0 {
; X64-MinGW-LABEL: test_large:
; X64-MinGW: leaq -40040(%rsp), %r11
; X64-MinGW-NEXT: cmpq %gs:40, %r11
; X64-MinGW-NEXT: ja .LBB2_2
; X64-MinGW-NEXT: jbe .LBB2_1
; X64-MinGW: movabsq $40040, %r10
; X64-MinGW-NEXT: movabsq $32, %r11
@ -326,7 +328,7 @@ define void @test_large() #0 {
; X64-FreeBSD: leaq -40008(%rsp), %r11
; X64-FreeBSD-NEXT: cmpq %fs:24, %r11
; X64-FreeBSD-NEXT: ja .LBB2_2
; X64-FreeBSD-NEXT: jbe .LBB2_1
; X64-FreeBSD: movabsq $40008, %r10
; X64-FreeBSD-NEXT: movabsq $0, %r11
@ -335,7 +337,7 @@ define void @test_large() #0 {
; X32-DFlyBSD: leal -40000(%esp), %ecx
; X32-DFlyBSD-NEXT: cmpl %fs:16, %ecx
; X32-DFlyBSD-NEXT: ja .LBB2_2
; X32-DFlyBSD-NEXT: jbe .LBB2_1
; X32-DFlyBSD: pushl $0
; X32-DFlyBSD-NEXT: pushl $40000
@ -344,7 +346,7 @@ define void @test_large() #0 {
; X64-DFlyBSD: leaq -40008(%rsp), %r11
; X64-DFlyBSD-NEXT: cmpq %fs:32, %r11
; X64-DFlyBSD-NEXT: ja .LBB2_2
; X64-DFlyBSD-NEXT: jbe .LBB2_1
; X64-DFlyBSD: movabsq $40008, %r10
; X64-DFlyBSD-NEXT: movabsq $0, %r11
@ -361,7 +363,7 @@ define fastcc void @test_fastcc() #0 {
; X32-Linux-LABEL: test_fastcc:
; X32-Linux: cmpl %gs:48, %esp
; X32-Linux-NEXT: ja .LBB3_2
; X32-Linux-NEXT: jbe .LBB3_1
; X32-Linux: pushl $0
; X32-Linux-NEXT: pushl $44
@ -371,7 +373,7 @@ define fastcc void @test_fastcc() #0 {
; X64-Linux-LABEL: test_fastcc:
; X64-Linux: cmpq %fs:112, %rsp
; X64-Linux-NEXT: ja .LBB3_2
; X64-Linux-NEXT: jbe .LBB3_1
; X64-Linux: movabsq $40, %r10
; X64-Linux-NEXT: movabsq $0, %r11
@ -381,7 +383,7 @@ define fastcc void @test_fastcc() #0 {
; X32ABI-LABEL: test_fastcc:
; X32ABI: cmpl %fs:64, %esp
; X32ABI-NEXT: ja .LBB3_2
; X32ABI-NEXT: jbe .LBB3_1
; X32ABI: movl $40, %r10d
; X32ABI-NEXT: movl $0, %r11d
@ -392,7 +394,7 @@ define fastcc void @test_fastcc() #0 {
; X32-Darwin: movl $432, %eax
; X32-Darwin-NEXT: cmpl %gs:(%eax), %esp
; X32-Darwin-NEXT: ja LBB3_2
; X32-Darwin-NEXT: jbe LBB3_1
; X32-Darwin: pushl $0
; X32-Darwin-NEXT: pushl $60
@ -402,7 +404,7 @@ define fastcc void @test_fastcc() #0 {
; X64-Darwin-LABEL: test_fastcc:
; X64-Darwin: cmpq %gs:816, %rsp
; X64-Darwin-NEXT: ja LBB3_2
; X64-Darwin-NEXT: jbe LBB3_1
; X64-Darwin: movabsq $40, %r10
; X64-Darwin-NEXT: movabsq $0, %r11
@ -412,7 +414,7 @@ define fastcc void @test_fastcc() #0 {
; X32-MinGW-LABEL: test_fastcc:
; X32-MinGW: cmpl %fs:20, %esp
; X32-MinGW-NEXT: ja LBB3_2
; X32-MinGW-NEXT: jbe LBB3_1
; X32-MinGW: pushl $0
; X32-MinGW-NEXT: pushl $40
@ -422,7 +424,7 @@ define fastcc void @test_fastcc() #0 {
; X64-MinGW-LABEL: test_fastcc:
; X64-MinGW: cmpq %gs:40, %rsp
; X64-MinGW-NEXT: ja .LBB3_2
; X64-MinGW-NEXT: jbe .LBB3_1
; X64-MinGW: movabsq $72, %r10
; X64-MinGW-NEXT: movabsq $32, %r11
@ -432,7 +434,7 @@ define fastcc void @test_fastcc() #0 {
; X64-FreeBSD-LABEL: test_fastcc:
; X64-FreeBSD: cmpq %fs:24, %rsp
; X64-FreeBSD-NEXT: ja .LBB3_2
; X64-FreeBSD-NEXT: jbe .LBB3_1
; X64-FreeBSD: movabsq $40, %r10
; X64-FreeBSD-NEXT: movabsq $0, %r11
@ -442,7 +444,7 @@ define fastcc void @test_fastcc() #0 {
; X32-DFlyBSD-LABEL: test_fastcc:
; X32-DFlyBSD: cmpl %fs:16, %esp
; X32-DFlyBSD-NEXT: ja .LBB3_2
; X32-DFlyBSD-NEXT: jbe .LBB3_1
; X32-DFlyBSD: pushl $0
; X32-DFlyBSD-NEXT: pushl $40
@ -452,7 +454,7 @@ define fastcc void @test_fastcc() #0 {
; X64-DFlyBSD-LABEL: test_fastcc:
; X64-DFlyBSD: cmpq %fs:32, %rsp
; X64-DFlyBSD-NEXT: ja .LBB3_2
; X64-DFlyBSD-NEXT: jbe .LBB3_1
; X64-DFlyBSD: movabsq $40, %r10
; X64-DFlyBSD-NEXT: movabsq $0, %r11
@ -463,14 +465,14 @@ define fastcc void @test_fastcc() #0 {
define fastcc void @test_fastcc_large() #0 {
%mem = alloca i32, i32 10000
call void @dummy_use (i32* %mem, i32 0)
call void @dummy_use (i32* %mem, i32 3)
ret void
; X32-Linux-LABEL: test_fastcc_large:
; X32-Linux: leal -40012(%esp), %eax
; X32-Linux-NEXT: cmpl %gs:48, %eax
; X32-Linux-NEXT: ja .LBB4_2
; X32-Linux-NEXT: jbe .LBB4_1
; X32-Linux: pushl $0
; X32-Linux-NEXT: pushl $40012
@ -481,7 +483,7 @@ define fastcc void @test_fastcc_large() #0 {
; X64-Linux: leaq -40008(%rsp), %r11
; X64-Linux-NEXT: cmpq %fs:112, %r11
; X64-Linux-NEXT: ja .LBB4_2
; X64-Linux-NEXT: jbe .LBB4_1
; X64-Linux: movabsq $40008, %r10
; X64-Linux-NEXT: movabsq $0, %r11
@ -492,7 +494,7 @@ define fastcc void @test_fastcc_large() #0 {
; X32ABI: leal -40008(%rsp), %r11d
; X32ABI-NEXT: cmpl %fs:64, %r11d
; X32ABI-NEXT: ja .LBB4_2
; X32ABI-NEXT: jbe .LBB4_1
; X32ABI: movl $40008, %r10d
; X32ABI-NEXT: movl $0, %r11d
@ -504,7 +506,7 @@ define fastcc void @test_fastcc_large() #0 {
; X32-Darwin: leal -40012(%esp), %eax
; X32-Darwin-NEXT: movl $432, %ecx
; X32-Darwin-NEXT: cmpl %gs:(%ecx), %eax
; X32-Darwin-NEXT: ja LBB4_2
; X32-Darwin-NEXT: jbe LBB4_1
; X32-Darwin: pushl $0
; X32-Darwin-NEXT: pushl $40012
@ -515,7 +517,7 @@ define fastcc void @test_fastcc_large() #0 {
; X64-Darwin: leaq -40008(%rsp), %r11
; X64-Darwin-NEXT: cmpq %gs:816, %r11
; X64-Darwin-NEXT: ja LBB4_2
; X64-Darwin-NEXT: jbe LBB4_1
; X64-Darwin: movabsq $40008, %r10
; X64-Darwin-NEXT: movabsq $0, %r11
@ -526,7 +528,7 @@ define fastcc void @test_fastcc_large() #0 {
; X32-MinGW: leal -40000(%esp), %eax
; X32-MinGW-NEXT: cmpl %fs:20, %eax
; X32-MinGW-NEXT: ja LBB4_2
; X32-MinGW-NEXT: jbe LBB4_1
; X32-MinGW: pushl $0
; X32-MinGW-NEXT: pushl $40000
@ -537,7 +539,7 @@ define fastcc void @test_fastcc_large() #0 {
; X64-MinGW: leaq -40040(%rsp), %r11
; X64-MinGW-NEXT: cmpq %gs:40, %r11
; X64-MinGW-NEXT: ja .LBB4_2
; X64-MinGW-NEXT: jbe .LBB4_1
; X64-MinGW: movabsq $40040, %r10
; X64-MinGW-NEXT: movabsq $32, %r11
@ -548,7 +550,7 @@ define fastcc void @test_fastcc_large() #0 {
; X64-FreeBSD: leaq -40008(%rsp), %r11
; X64-FreeBSD-NEXT: cmpq %fs:24, %r11
; X64-FreeBSD-NEXT: ja .LBB4_2
; X64-FreeBSD-NEXT: jbe .LBB4_1
; X64-FreeBSD: movabsq $40008, %r10
; X64-FreeBSD-NEXT: movabsq $0, %r11
@ -559,7 +561,7 @@ define fastcc void @test_fastcc_large() #0 {
; X32-DFlyBSD: leal -40000(%esp), %eax
; X32-DFlyBSD-NEXT: cmpl %fs:16, %eax
; X32-DFlyBSD-NEXT: ja .LBB4_2
; X32-DFlyBSD-NEXT: jbe .LBB4_1
; X32-DFlyBSD: pushl $0
; X32-DFlyBSD-NEXT: pushl $40000
@ -570,7 +572,7 @@ define fastcc void @test_fastcc_large() #0 {
; X64-DFlyBSD: leaq -40008(%rsp), %r11
; X64-DFlyBSD-NEXT: cmpq %fs:32, %r11
; X64-DFlyBSD-NEXT: ja .LBB4_2
; X64-DFlyBSD-NEXT: jbe .LBB4_1
; X64-DFlyBSD: movabsq $40008, %r10
; X64-DFlyBSD-NEXT: movabsq $0, %r11
@ -593,7 +595,7 @@ define fastcc void @test_fastcc_large_with_ecx_arg(i32 %a) #0 {
; X32-Darwin-NEXT: movl $432, %ecx
; X32-Darwin-NEXT: cmpl %gs:(%ecx), %eax
; X32-Darwin-NEXT: popl %ecx
; X32-Darwin-NEXT: ja LBB5_2
; X32-Darwin-NEXT: jbe LBB5_1
; X32-Darwin: pushl $0
; X32-Darwin-NEXT: pushl $40012

View File

@ -160,14 +160,7 @@ attributes #2 = { "no-frame-pointer-elim"="false" nounwind }
;
; CHECK-LABEL: segmentedStack:
; CHECK: cmpq
; CHECK-NEXT: ja [[ENTRY_LABEL:LBB[0-9_]+]]
;
; CHECK: callq ___morestack
; CHECK-NEXT: retq
;
; CHECK: [[ENTRY_LABEL]]:
; Prologue
; CHECK: push
; CHECK-NEXT: jbe [[ENTRY_LABEL:LBB[0-9_]+]]
;
; In PR26107, we use to drop these two basic blocks, because
; the segmentedStack entry block was jumping directly to
@ -186,6 +179,12 @@ attributes #2 = { "no-frame-pointer-elim"="false" nounwind }
;
; CHECK: [[STRINGS_EQUAL]]
; CHECK: popq
;
; CHECK: [[ENTRY_LABEL]]:
; CHECK: callq ___morestack
; CHECK-NEXT: retq
;
define zeroext i1 @segmentedStack(i8* readonly %vk1, i8* readonly %vk2, i64 %key_size) #5 {
entry:
%cmp.i = icmp eq i8* %vk1, null