mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 21:31:41 +00:00
Fixes removal of dead elements from PressureDiff (PR37252).
Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D51495 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343090 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e99f0eb61e
commit
3502f75dcf
@ -681,8 +681,7 @@ void PressureDiff::addPressureChange(unsigned RegUnit, bool IsDec,
|
||||
PressureDiff::iterator J;
|
||||
for (J = std::next(I); J != E && J->isValid(); ++J, ++I)
|
||||
*I = *J;
|
||||
if (J != E)
|
||||
*I = *J;
|
||||
*I = PressureChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,11 +57,11 @@ define void @si32(i32 %x, i32 %y, i32* %p, i32* %q) nounwind {
|
||||
; X32-LABEL: si32:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: pushl %esi
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; X32-NEXT: cltd
|
||||
; X32-NEXT: idivl {{[0-9]+}}(%esp)
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movl %eax, (%esi)
|
||||
; X32-NEXT: movl %edx, (%ecx)
|
||||
; X32-NEXT: popl %esi
|
||||
@ -87,11 +87,11 @@ define void @si16(i16 %x, i16 %y, i16* %p, i16* %q) nounwind {
|
||||
; X32-LABEL: si16:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: pushl %esi
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movzwl {{[0-9]+}}(%esp), %eax
|
||||
; X32-NEXT: cwtd
|
||||
; X32-NEXT: idivw {{[0-9]+}}(%esp)
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movw %ax, (%esi)
|
||||
; X32-NEXT: movw %dx, (%ecx)
|
||||
; X32-NEXT: popl %esi
|
||||
@ -118,11 +118,11 @@ define void @si8(i8 %x, i8 %y, i8* %p, i8* %q) nounwind {
|
||||
; X32-LABEL: si8:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: pushl %ebx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
|
||||
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
|
||||
; X32-NEXT: cbtw
|
||||
; X32-NEXT: idivb {{[0-9]+}}(%esp)
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
|
||||
; X32-NEXT: movsbl %ah, %ebx
|
||||
; X32-NEXT: movb %al, (%edx)
|
||||
; X32-NEXT: movb %bl, (%ecx)
|
||||
@ -201,11 +201,11 @@ define void @ui32(i32 %x, i32 %y, i32* %p, i32* %q) nounwind {
|
||||
; X32-LABEL: ui32:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: pushl %esi
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; X32-NEXT: xorl %edx, %edx
|
||||
; X32-NEXT: divl {{[0-9]+}}(%esp)
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movl %eax, (%esi)
|
||||
; X32-NEXT: movl %edx, (%ecx)
|
||||
; X32-NEXT: popl %esi
|
||||
@ -231,11 +231,11 @@ define void @ui16(i16 %x, i16 %y, i16* %p, i16* %q) nounwind {
|
||||
; X32-LABEL: ui16:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: pushl %esi
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movzwl {{[0-9]+}}(%esp), %eax
|
||||
; X32-NEXT: xorl %edx, %edx
|
||||
; X32-NEXT: divw {{[0-9]+}}(%esp)
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
|
||||
; X32-NEXT: movw %ax, (%esi)
|
||||
; X32-NEXT: movw %dx, (%ecx)
|
||||
; X32-NEXT: popl %esi
|
||||
@ -262,11 +262,11 @@ define void @ui8(i8 %x, i8 %y, i8* %p, i8* %q) nounwind {
|
||||
; X32-LABEL: ui8:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: pushl %ebx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
|
||||
; X32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
|
||||
; X32-NEXT: # kill: def $eax killed $eax def $ax
|
||||
; X32-NEXT: divb {{[0-9]+}}(%esp)
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
|
||||
; X32-NEXT: movzbl %ah, %ebx
|
||||
; X32-NEXT: movb %al, (%edx)
|
||||
; X32-NEXT: movb %bl, (%ecx)
|
||||
|
@ -152,8 +152,8 @@ define i8 @test_srem_noext_ah(i8 %x, i8 %y) {
|
||||
; X32-LABEL: test_srem_noext_ah:
|
||||
; X32: # %bb.0:
|
||||
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
|
||||
; X32-NEXT: movb {{[0-9]+}}(%esp), %cl
|
||||
; X32-NEXT: cbtw
|
||||
; X32-NEXT: movb {{[0-9]+}}(%esp), %cl
|
||||
; X32-NEXT: idivb %cl
|
||||
; X32-NEXT: movsbl %ah, %eax
|
||||
; X32-NEXT: addb %cl, %al
|
||||
|
@ -83,6 +83,7 @@ define void @f_thunk(i8* %this, ...) {
|
||||
; LINUX-NEXT: movq %rbp, %rdx
|
||||
; LINUX-NEXT: movq %r13, %rcx
|
||||
; LINUX-NEXT: movq %r12, %r8
|
||||
; LINUX-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload
|
||||
; LINUX-NEXT: movq %r15, %r9
|
||||
; LINUX-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
|
||||
; LINUX-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
|
||||
@ -92,7 +93,6 @@ define void @f_thunk(i8* %this, ...) {
|
||||
; LINUX-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm5 # 16-byte Reload
|
||||
; LINUX-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
|
||||
; LINUX-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
|
||||
; LINUX-NEXT: movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload
|
||||
; LINUX-NEXT: addq $360, %rsp # imm = 0x168
|
||||
; LINUX-NEXT: .cfi_def_cfa_offset 56
|
||||
; LINUX-NEXT: popq %rbx
|
||||
@ -177,6 +177,7 @@ define void @f_thunk(i8* %this, ...) {
|
||||
; LINUX-X32-NEXT: movq %rbp, %rdx
|
||||
; LINUX-X32-NEXT: movq %r13, %rcx
|
||||
; LINUX-X32-NEXT: movq %r12, %r8
|
||||
; LINUX-X32-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %al # 1-byte Reload
|
||||
; LINUX-X32-NEXT: movq %r15, %r9
|
||||
; LINUX-X32-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm0 # 16-byte Reload
|
||||
; LINUX-X32-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm1 # 16-byte Reload
|
||||
@ -186,7 +187,6 @@ define void @f_thunk(i8* %this, ...) {
|
||||
; LINUX-X32-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm5 # 16-byte Reload
|
||||
; LINUX-X32-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm6 # 16-byte Reload
|
||||
; LINUX-X32-NEXT: movaps {{[-0-9]+}}(%e{{[sb]}}p), %xmm7 # 16-byte Reload
|
||||
; LINUX-X32-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %al # 1-byte Reload
|
||||
; LINUX-X32-NEXT: addl $344, %esp # imm = 0x158
|
||||
; LINUX-X32-NEXT: .cfi_def_cfa_offset 56
|
||||
; LINUX-X32-NEXT: popq %rbx
|
||||
|
@ -18,15 +18,15 @@ define void @f() {
|
||||
; X64-NEXT: .cfi_offset %r14, -24
|
||||
; X64-NEXT: .cfi_offset %rbp, -16
|
||||
; X64-NEXT: movzbl {{[0-9]+}}(%rsp), %ebp
|
||||
; X64-NEXT: movq %rbp, %rcx
|
||||
; X64-NEXT: shlq $62, %rcx
|
||||
; X64-NEXT: sarq $62, %rcx
|
||||
; X64-NEXT: movq (%rsp), %rbx
|
||||
; X64-NEXT: movb (%rax), %al
|
||||
; X64-NEXT: movzbl %al, %eax
|
||||
; X64-NEXT: # kill: def $eax killed $eax def $ax
|
||||
; X64-NEXT: divb (%rax)
|
||||
; X64-NEXT: movl %eax, %r14d
|
||||
; X64-NEXT: movq %rbp, %rcx
|
||||
; X64-NEXT: shlq $62, %rcx
|
||||
; X64-NEXT: sarq $62, %rcx
|
||||
; X64-NEXT: xorl %edi, %edi
|
||||
; X64-NEXT: xorl %esi, %esi
|
||||
; X64-NEXT: movq %rbx, %rdx
|
||||
@ -86,11 +86,6 @@ define void @f() {
|
||||
; X86-NEXT: .cfi_offset %edi, -16
|
||||
; X86-NEXT: .cfi_offset %ebx, -12
|
||||
; X86-NEXT: movzbl {{[0-9]+}}(%esp), %esi
|
||||
; X86-NEXT: movl %esi, %ecx
|
||||
; X86-NEXT: shll $30, %ecx
|
||||
; X86-NEXT: movl %ecx, %edx
|
||||
; X86-NEXT: sarl $30, %edx
|
||||
; X86-NEXT: sarl $31, %ecx
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %edi
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %ebx
|
||||
; X86-NEXT: movb (%eax), %al
|
||||
@ -98,16 +93,21 @@ define void @f() {
|
||||
; X86-NEXT: # kill: def $eax killed $eax def $ax
|
||||
; X86-NEXT: divb (%eax)
|
||||
; X86-NEXT: movb %al, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill
|
||||
; X86-NEXT: leal {{[0-9]+}}(%esp), %eax
|
||||
; X86-NEXT: movl %esi, %eax
|
||||
; X86-NEXT: shll $30, %eax
|
||||
; X86-NEXT: movl %eax, %ecx
|
||||
; X86-NEXT: sarl $30, %ecx
|
||||
; X86-NEXT: sarl $31, %eax
|
||||
; X86-NEXT: leal {{[0-9]+}}(%esp), %edx
|
||||
; X86-NEXT: pushl %eax
|
||||
; X86-NEXT: pushl %ecx
|
||||
; X86-NEXT: pushl %edx
|
||||
; X86-NEXT: pushl %ebx
|
||||
; X86-NEXT: pushl %edi
|
||||
; X86-NEXT: pushl $0
|
||||
; X86-NEXT: pushl $0
|
||||
; X86-NEXT: pushl $0
|
||||
; X86-NEXT: pushl $0
|
||||
; X86-NEXT: pushl %eax
|
||||
; X86-NEXT: pushl %edx
|
||||
; X86-NEXT: calll __modti3
|
||||
; X86-NEXT: addl $32, %esp
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
@ -239,16 +239,16 @@ define void @g() {
|
||||
; X86-NEXT: .cfi_offset %edi, -16
|
||||
; X86-NEXT: .cfi_offset %ebx, -12
|
||||
; X86-NEXT: movzbl {{[0-9]+}}(%esp), %esi
|
||||
; X86-NEXT: movl %esi, %ecx
|
||||
; X86-NEXT: shll $30, %ecx
|
||||
; X86-NEXT: sarl $30, %ecx
|
||||
; X86-NEXT: movl (%esp), %edi
|
||||
; X86-NEXT: movb (%eax), %al
|
||||
; X86-NEXT: movzbl %al, %eax
|
||||
; X86-NEXT: # kill: def $eax killed $eax def $ax
|
||||
; X86-NEXT: divb (%eax)
|
||||
; X86-NEXT: movl %eax, %ebx
|
||||
; X86-NEXT: pushl %ecx
|
||||
; X86-NEXT: movl %esi, %eax
|
||||
; X86-NEXT: shll $30, %eax
|
||||
; X86-NEXT: sarl $30, %eax
|
||||
; X86-NEXT: pushl %eax
|
||||
; X86-NEXT: pushl %edi
|
||||
; X86-NEXT: pushl $0
|
||||
; X86-NEXT: pushl $0
|
||||
|
Loading…
x
Reference in New Issue
Block a user