From 12f1e007f78b97261c0d7b95f2c9bc71518fdd97 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 24 Apr 2008 00:19:54 +0000 Subject: [PATCH] Don't replace multiple result of calls with undef, sccp tracks getresult values, not call values in this case. llvm-svn: 50202 --- llvm/lib/Transforms/Scalar/SCCP.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index bef13affd8b0..e849b2d87658 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/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))) {