diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-24 00:19:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-24 00:19:54 +0000 |
commit | 12f1e007f78b97261c0d7b95f2c9bc71518fdd97 (patch) | |
tree | 6c9b9f273156cfeb3d25958f6e06863a2eba39f3 | |
parent | 769203cb03e8212ec56f46e25bfd792d39a99cfa (diff) | |
download | bcm5719-llvm-12f1e007f78b97261c0d7b95f2c9bc71518fdd97.tar.gz bcm5719-llvm-12f1e007f78b97261c0d7b95f2c9bc71518fdd97.zip |
Don't replace multiple result of calls with undef,
sccp tracks getresult values, not call values in this
case.
llvm-svn: 50202
-rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index bef13affd8b..e849b2d8765 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<StructType>(Inst->getType()) || isa<TerminatorInst>(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<StructType>(Inst->getType())) { LatticeVal &IV = Values[Inst]; if (IV.isConstant() || (IV.isUndefined() && !isa<TerminatorInst>(Inst))) { |