Follow-up for D73754
DL is assigned in CodeGenPrepare::runOnFunction and is guaranteed to be
non-null.
const TargetLowering *TLI,
const DataLayout *DL,
bool &ModifiedDT) {
- if (!DL)
- return false;
-
// If a zero input is undefined, it doesn't make sense to despeculate that.
if (match(CountZeros->getOperand(1), m_One()))
return false;
}
bool CodeGenPrepare::optimizeSwitchInst(SwitchInst *SI) {
- if (!DL)
- return false;
-
Value *Cond = SI->getCondition();
Type *OldType = Cond->getType();
LLVMContext &Context = Cond->getContext();