From: Craig Topper Date: Wed, 12 Apr 2017 22:54:24 +0000 (+0000) Subject: [InstSimplify] Don't try to constant fold AllocaInsts since it won't do anything. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b25869aa9e728159170a4708d8274bbad66bcbce;p=llvm [InstSimplify] Don't try to constant fold AllocaInsts since it won't do anything. Should give a small compile time improvement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300125 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index 0e522cb4e49..e12f640394e 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -4627,6 +4627,10 @@ Value *llvm::SimplifyInstruction(Instruction *I, const DataLayout &DL, Result = SimplifyCastInst(I->getOpcode(), I->getOperand(0), I->getType(), DL, TLI, DT, AC, I); break; + case Instruction::Alloca: + // No simplifications for Alloca and it can't be constant folded. + Result = nullptr; + break; } // In general, it is possible for computeKnownBits to determine all bits in a