Bug 1004363 - Follow-up patch to fix a few more places that should ignore trivial blocks on ARM. r=me

This commit is contained in:
Dan Gohman 2014-05-20 22:58:45 -07:00
parent f1ed68fc68
commit f89c614a21
2 changed files with 4 additions and 4 deletions

View File

@ -1092,7 +1092,7 @@ CodeGeneratorARM::visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool)
size_t numCases = mir->numCases();
for (size_t i = 0; i < numCases; i++) {
LBlock *caseblock = mir->getCase(numCases - 1 - i)->lir();
LBlock *caseblock = skipTrivialBlocks(mir->getCase(numCases - 1 - i))->lir();
Label *caseheader = caseblock->label();
uint32_t caseoffset = caseheader->offset();
@ -1136,7 +1136,7 @@ CodeGeneratorARM::emitTableSwitchDispatch(MTableSwitch *mir, Register index, Reg
// unhandled case is the default case (both out of range high and out of range low)
// I then insert a branch to default case into the extra slot, which ensures
// we don't attempt to execute the address table.
Label *defaultcase = mir->getDefault()->lir()->label();
Label *defaultcase = skipTrivialBlocks(mir->getDefault())->lir()->label();
int32_t cases = mir->numCases();
// Lower value with low value

View File

@ -1018,7 +1018,7 @@ CodeGeneratorMIPS::visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool)
return false;
for (size_t i = 0; i < mir->numCases(); i++) {
LBlock *caseblock = mir->getCase(i)->lir();
LBlock *caseblock = skipTrivialBlocks(mir->getCase(i))->lir();
Label *caseheader = caseblock->label();
uint32_t caseoffset = caseheader->offset();
@ -1039,7 +1039,7 @@ bool
CodeGeneratorMIPS::emitTableSwitchDispatch(MTableSwitch *mir, Register index,
Register address)
{
Label *defaultcase = mir->getDefault()->lir()->label();
Label *defaultcase = skipTrivialBlocks(mir->getDefault())->lir()->label();
// Lower value with low value
if (mir->low() != 0)