Skip to content

Commit 44cdae6

Browse files
committed
[CodeGenPrepare] Delete dead !DL check
Follow-up for D73754 DL is assigned in CodeGenPrepare::runOnFunction and is guaranteed to be non-null.
1 parent 7cb5d96 commit 44cdae6

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,9 +1811,6 @@ static bool despeculateCountZeros(IntrinsicInst *CountZeros,
18111811
const TargetLowering *TLI,
18121812
const DataLayout *DL,
18131813
bool &ModifiedDT) {
1814-
if (!DL)
1815-
return false;
1816-
18171814
// If a zero input is undefined, it doesn't make sense to despeculate that.
18181815
if (match(CountZeros->getOperand(1), m_One()))
18191816
return false;
@@ -6344,9 +6341,6 @@ bool CodeGenPrepare::tryToSinkFreeOperands(Instruction *I) {
63446341
}
63456342

63466343
bool CodeGenPrepare::optimizeSwitchInst(SwitchInst *SI) {
6347-
if (!DL)
6348-
return false;
6349-
63506344
Value *Cond = SI->getCondition();
63516345
Type *OldType = Cond->getType();
63526346
LLVMContext &Context = Cond->getContext();

0 commit comments

Comments
 (0)