Register allocators can't handle non-uniform register sets
Neither the linear scan register allocator nor the graph-colouring allocator can properly handle the fact that some registers on x86 have 8 and 16-bit versions and some don't. We got away with this until now because the only free registers on x86 were %eax, %ecx and %edx, but now we can also treat %esi as free when it isn't being used for R1 (see f857f074). However, %esi doesn't have an 8-bit version, so we cannot treat it as allocatable because the register allocator will try to use it when an 8-bit register is needed (see 10575479).
LLVM doesn't have this problem, so one workaround is to compile with -fllvm to get the extra register(s) on x86.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (NCG) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |