diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-01-21 07:03:21 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-01-21 07:03:21 +0000 |
commit | 9e26c1cc0c48bf9fed270ec9d6abdb46fbc8114c (patch) | |
tree | da8235bf04c810efecc694dc15761ffc347a9d94 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | f2f73bf214a0b4ce7b3dc62de98144b6b00e2e05 (diff) | |
download | bcm5719-llvm-9e26c1cc0c48bf9fed270ec9d6abdb46fbc8114c.tar.gz bcm5719-llvm-9e26c1cc0c48bf9fed270ec9d6abdb46fbc8114c.zip |
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.
llvm-svn: 94069
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index aabbc90c8be..2549a5162c6 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1167,7 +1167,7 @@ bool BitcodeReader::ParseConstants() { Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy); Constant *Op1 = ValueList.getConstantFwdRef(Record[2], OpTy); - if (OpTy->isFloatingPoint()) + if (OpTy->isFPOrFPVector()) V = ConstantExpr::getFCmp(Record[3], Op0, Op1); else V = ConstantExpr::getICmp(Record[3], Op0, Op1); |