mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-28 19:11:21 +00:00
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
This commit is contained in:
1 parent
f2f73bf214
commit
9e26c1cc0c
4 files changed
+25
-11
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user