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 | 1c41942c3b2583d78db2718a5cd68301f0c1eaba (patch) | |
| tree | 621bde31a1048339d614f39069331c9c700e13fd /lib/Bitcode/Reader | |
| parent | 886e8762731e88bde5b656df61aa6cef9d4f308c (diff) | |
| download | external_llvm-1c41942c3b2583d78db2718a5cd68301f0c1eaba.zip external_llvm-1c41942c3b2583d78db2718a5cd68301f0c1eaba.tar.gz external_llvm-1c41942c3b2583d78db2718a5cd68301f0c1eaba.tar.bz2 | |
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
Diffstat (limited to 'lib/Bitcode/Reader')
| -rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index aabbc90..2549a51 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/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); |
