Fix a crasher trying to fold each element in a comparison between two vectors
authorNick Lewycky <nicholas@mxc.ca>
Thu, 21 Jan 2010 07:03:21 +0000 (07:03 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 21 Jan 2010 07:03:21 +0000 (07:03 +0000)
commit401f3258f6e72cbc3e1f5e17c3976b241feb1c66
tree621bde31a1048339d614f39069331c9c700e13fd
parent1548b863ce316c0b3be81d50d6388147df9aba72
Fix a crasher trying to fold each element in a comparison between two vectors
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.

Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94069 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
lib/VMCore/ConstantFold.cpp
lib/VMCore/Constants.cpp
test/Transforms/ConstProp/constant-expr.ll