Fix: SLPVectorizer crashes with assertion when vectorizing a cmp instruction.
authorErik Eckstein <eeckstein@apple.com>
Mon, 2 Feb 2015 12:45:34 +0000 (12:45 +0000)
committerErik Eckstein <eeckstein@apple.com>
Mon, 2 Feb 2015 12:45:34 +0000 (12:45 +0000)
commit7330e358f6b5c696fe58a63671e64dc81d92dee8
treeeda2f4f0c4ec7264d213acf40be9ea06ee8b1fd4
parent82cd1357384d09aaae60d378c5efd2275d8676b3
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
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/crash_cmpop.ll [new file with mode: 0644]