git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Joe Abbey
2012-11-19 19:22:55 +00:00
parent 948d9f743e
commit e46b14acab

View File

@ -1182,7 +1182,8 @@ bool BitcodeReader::ParseConstants() {
} }
case bitc::CST_CODE_CE_SELECT: // CE_SELECT: [opval#, opval#, opval#] case bitc::CST_CODE_CE_SELECT: // CE_SELECT: [opval#, opval#, opval#]
if (Record.size() < 3) return Error("Invalid CE_SELECT record"); if (Record.size() < 3) return Error("Invalid CE_SELECT record");
V = ConstantExpr::getSelect(ValueList.getConstantFwdRef(Record[0], V = ConstantExpr::getSelect(
ValueList.getConstantFwdRef(Record[0],
Type::getInt1Ty(Context)), Type::getInt1Ty(Context)),
ValueList.getConstantFwdRef(Record[1],CurTy), ValueList.getConstantFwdRef(Record[1],CurTy),
ValueList.getConstantFwdRef(Record[2],CurTy)); ValueList.getConstantFwdRef(Record[2],CurTy));
@ -1193,7 +1194,8 @@ bool BitcodeReader::ParseConstants() {
dyn_cast_or_null<VectorType>(getTypeByID(Record[0])); dyn_cast_or_null<VectorType>(getTypeByID(Record[0]));
if (OpTy == 0) return Error("Invalid CE_EXTRACTELT record"); if (OpTy == 0) return Error("Invalid CE_EXTRACTELT record");
Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy); Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy);
Constant *Op1 = ValueList.getConstantFwdRef(Record[2], Type::getInt32Ty(Context)); Constant *Op1 = ValueList.getConstantFwdRef(Record[2],
Type::getInt32Ty(Context));
V = ConstantExpr::getExtractElement(Op0, Op1); V = ConstantExpr::getExtractElement(Op0, Op1);
break; break;
} }
@ -1204,7 +1206,8 @@ bool BitcodeReader::ParseConstants() {
Constant *Op0 = ValueList.getConstantFwdRef(Record[0], OpTy); Constant *Op0 = ValueList.getConstantFwdRef(Record[0], OpTy);
Constant *Op1 = ValueList.getConstantFwdRef(Record[1], Constant *Op1 = ValueList.getConstantFwdRef(Record[1],
OpTy->getElementType()); OpTy->getElementType());
Constant *Op2 = ValueList.getConstantFwdRef(Record[2], Type::getInt32Ty(Context)); Constant *Op2 = ValueList.getConstantFwdRef(Record[2],
Type::getInt32Ty(Context));
V = ConstantExpr::getInsertElement(Op0, Op1, Op2); V = ConstantExpr::getInsertElement(Op0, Op1, Op2);
break; break;
} }