mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Reject really weird coalescer case when trying to merge identical subregisters
of different register classes. e.g. %reg1048:3<def> = EXTRACT_SUBREG %RAX<kill>, 3 Where %reg1048 is a GR32 register. This is not impossible to handle, but it is pretty hard and very rare. This should unbreak the dragonegg builder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102672 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1394,6 +1394,13 @@ bool SimpleRegisterCoalescing::JoinCopy(CopyRec &TheCopy, bool &Again) {
|
||||
return false; // Not coalescable.
|
||||
}
|
||||
|
||||
// We cannot handle dual subreg indices and mismatched classes at the same
|
||||
// time.
|
||||
if (SrcSubIdx && DstSubIdx && differingRegisterClasses(SrcReg, DstReg)) {
|
||||
DEBUG(dbgs() << "\tCannot handle subreg indices and mismatched classes.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that a physical source register is compatible with dst regclass
|
||||
if (SrcIsPhys) {
|
||||
unsigned SrcSubReg = SrcSubIdx ?
|
||||
|
Reference in New Issue
Block a user