A pointer dereference was added (D141302) above an assert that checks
whether the pointer is null. This commit moves the assert above the
dereference and transforms it into an llvm_unreachable to better express
the intent that certain switch cases should never be reached.
Differential Revision: https://reviews.llvm.org/D145599
Prev = MRI.getUniqueVRegDef(Root.getOperand(2).getReg());
break;
default:
- break;
+ llvm_unreachable("Unknown pattern for machine combiner");
}
// Don't reassociate if Prev and Root are in different blocks.
if (Prev->getParent() != Root.getParent())
return;
- assert(Prev && "Unknown pattern for machine combiner");
-
reassociateOps(Root, *Prev, Pattern, InsInstrs, DelInstrs, InstIdxForVirtReg);
}