mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-19 03:29:22 +00:00
Add more thorough error checking for NULL register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46605 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c67aa7cbd5
commit
175e81598a
@ -597,10 +597,11 @@ void ScheduleDAG::EmitSubregNode(SDNode *Node,
|
|||||||
// Grab the destination register
|
// Grab the destination register
|
||||||
const TargetRegisterClass *DRC = 0;
|
const TargetRegisterClass *DRC = 0;
|
||||||
DRC = RegInfo.getRegClass(VRBase);
|
DRC = RegInfo.getRegClass(VRBase);
|
||||||
assert(SRC == DRC &&
|
assert(SRC && DRC && SRC == DRC &&
|
||||||
"Source subregister and destination must have the same class");
|
"Source subregister and destination must have the same class");
|
||||||
} else {
|
} else {
|
||||||
// Create the reg
|
// Create the reg
|
||||||
|
assert(SRC && "Couldn't find source register class");
|
||||||
VRBase = RegInfo.createVirtualRegister(SRC);
|
VRBase = RegInfo.createVirtualRegister(SRC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user