From: Chris Lattner Date: Thu, 24 Apr 2008 00:19:54 +0000 (+0000) Subject: Don't replace multiple result of calls with undef, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7cb22ecf226842f04f2ee4b8ed040ea503332499;p=oota-llvm.git Don't replace multiple result of calls with undef, sccp tracks getresult values, not call values in this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50202 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index bef13affd8b..e849b2d8765 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1516,7 +1516,8 @@ bool SCCP::runOnFunction(Function &F) { // for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) { Instruction *Inst = BI++; - if (Inst->getType() == Type::VoidTy || + if (Inst->getType() == Type::VoidTy || + isa(Inst->getType()) || isa(Inst)) continue; @@ -1692,7 +1693,8 @@ bool IPSCCP::runOnModule(Module &M) { } else { for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) { Instruction *Inst = BI++; - if (Inst->getType() != Type::VoidTy) { + if (Inst->getType() != Type::VoidTy && + !isa(Inst->getType())) { LatticeVal &IV = Values[Inst]; if (IV.isConstant() || (IV.isUndefined() && !isa(Inst))) {