diff options
author | Erik Eckstein <eeckstein@apple.com> | 2015-02-02 12:45:34 +0000 |
---|---|---|
committer | Erik Eckstein <eeckstein@apple.com> | 2015-02-02 12:45:34 +0000 |
commit | 7330e358f6b5c696fe58a63671e64dc81d92dee8 (patch) | |
tree | eda2f4f0c4ec7264d213acf40be9ea06ee8b1fd4 /llvm/lib/Transforms | |
parent | 82cd1357384d09aaae60d378c5efd2275d8676b3 (diff) | |
download | bcm5719-llvm-7330e358f6b5c696fe58a63671e64dc81d92dee8.tar.gz bcm5719-llvm-7330e358f6b5c696fe58a63671e64dc81d92dee8.zip |
Fix: SLPVectorizer crashes with assertion when vectorizing a cmp instruction.
The commit r225977 uncovered this bug. The problem was that the vectorizer tried to
read the second operand of an already deleted instruction.
The bug didn't show up before r225977 because the freed memory still contained a non-null pointer.
With r225977 deletion of instructions is delayed and the read operand pointer is always null.
llvm-svn: 227800
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 08af1daf9bb..d1a843828c3 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -3943,6 +3943,7 @@ bool SLPVectorizer::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) { // and the iterator may become invalid value. it = BB->begin(); e = BB->end(); + break; } } } |