diff options
author | Owen Anderson <resistor@mac.com> | 2006-08-25 22:13:55 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2006-08-25 22:13:55 +0000 |
commit | 203572552d9f91455972ba322a4348e3d1a67c9c (patch) | |
tree | f8a507bf777f8d7c3df1c234d78f8ffca35a7cfa /lib/Transforms/Scalar/LoopUnroll.cpp | |
parent | eb705914924865201f8b8018977d94594b258142 (diff) | |
download | external_llvm-203572552d9f91455972ba322a4348e3d1a67c9c.zip external_llvm-203572552d9f91455972ba322a4348e3d1a67c9c.tar.gz external_llvm-203572552d9f91455972ba322a4348e3d1a67c9c.tar.bz2 |
Fix a crash related to updating Phi nodes in the original header block. This was
causing a crash in 175.vpr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnroll.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnroll.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index 3ffdfac..676afb0 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -269,7 +269,8 @@ bool LoopUnroll::visitLoop(Loop *L) { if (isa<Instruction>(InVal)) InVal = LastValueMap[InVal]; (*SI)->removeIncomingValue(LatchBlock, false); - (*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock])); + if (InVal) + (*SI)->addIncoming(InVal, cast<BasicBlock>(LastValueMap[LatchBlock])); } } |