[llvm] 44cdae6 - [CodeGenPrepare] Delete dead !DL check
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 2 09:49:30 PST 2020
Author: Fangrui Song
Date: 2020-02-02T09:49:06-08:00
New Revision: 44cdae68c3b8068750e3f6edcccad99e091ce922
URL: https://github.com/llvm/llvm-project/commit/44cdae68c3b8068750e3f6edcccad99e091ce922
DIFF: https://github.com/llvm/llvm-project/commit/44cdae68c3b8068750e3f6edcccad99e091ce922.diff
LOG: [CodeGenPrepare] Delete dead !DL check
Follow-up for D73754
DL is assigned in CodeGenPrepare::runOnFunction and is guaranteed to be
non-null.
Added:
Modified:
llvm/lib/CodeGen/CodeGenPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 5dcda734ce3b..38563b5f256d 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -1811,9 +1811,6 @@ static bool despeculateCountZeros(IntrinsicInst *CountZeros,
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;
@@ -6344,9 +6341,6 @@ bool CodeGenPrepare::tryToSinkFreeOperands(Instruction *I) {
}
bool CodeGenPrepare::optimizeSwitchInst(SwitchInst *SI) {
- if (!DL)
- return false;
-
Value *Cond = SI->getCondition();
Type *OldType = Cond->getType();
LLVMContext &Context = Cond->getContext();
More information about the llvm-commits
mailing list