-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
| Bugzilla Link | 11344 |
| Version | unspecified |
| OS | All |
| CC | @asl |
Extended Description
In MultiSource/.../oggenc vorbis_encode_ctl the following sequence of instructions is generated
testq %rbx, %rbx
jne LBB11_38
movq $0, 5568(%rax)
movq $0, 5592(%rax)
movq $0, 5600(%rax)
pxor %xmm0, %xmm0
xorl %ecx, %ecx
xorl %edx, %edx
jmp LBB11_43
I think for the $0 in the moves we should use the knowledge that %rbx must already be 0 since the condition jumped on nonzero. We can then use rbi in the instructions to shorten the encoding. More generally, we should use any knowledge we have of constants in registers from previous blocks to avoid regenerating them in current blocks.
An alternative to using %rbx here would have been to see that any the end of the block both %ecx and %edx were set to 0. Had those been 64-bit registers we could have used either on instead of $0 had we moved the xor sooner
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla