aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-02-02 09:45:48 -0800
committerFangrui Song <maskray@google.com>2020-02-02 09:49:06 -0800
commit44cdae68c3b8068750e3f6edcccad99e091ce922 (patch)
treec8b9fa7e89973feca81b1b9b0c08c90b3a91d006
parent7cb5d96fbe75192cd3bb5a3554a6c6ff87dc7b6a (diff)
downloadllvm-44cdae68c3b8068750e3f6edcccad99e091ce922.zip
llvm-44cdae68c3b8068750e3f6edcccad99e091ce922.tar.gz
llvm-44cdae68c3b8068750e3f6edcccad99e091ce922.tar.bz2
[CodeGenPrepare] Delete dead !DL check
Follow-up for D73754 DL is assigned in CodeGenPrepare::runOnFunction and is guaranteed to be non-null.
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 5dcda73..38563b5 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();