[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
This commit is contained in:
Craig Topper 2017-04-12 22:54:24 +00:00
parent f31bea8f80
commit b25869aa9e

View File

@ -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