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)
commit40d542097aef5f334d870aa7a4c169ca1afc5763
tree8cf1f7cd5cbbeba6ee8b14f8f83111d2ce7fd48b
parent0e615f170839e4383c9a6163af51294b69f88c4d
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227800 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/crash_cmpop.ll [new file with mode: 0644]