1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

produce the same diagnostics for vicmp constant exprs as vicmp instructions.

llvm-svn: 61685
This commit is contained in:
Chris Lattner 2009-01-05 08:26:05 +00:00
parent f6df8b7ec7
commit 9bc5db2fa4

View File

@ -1728,9 +1728,15 @@ bool LLParser::ParseValID(ValID &ID) {
ID.ConstantVal = ConstantExpr::getICmp(Pred, Val0, Val1);
} else if (Opc == Instruction::VFCmp) {
// FIXME: REMOVE VFCMP Support
if (!Val0->getType()->isFPOrFPVector() ||
!isa<VectorType>(Val0->getType()))
return Error(ID.Loc, "vfcmp requires vector floating point operands");
ID.ConstantVal = ConstantExpr::getVFCmp(Pred, Val0, Val1);
} else if (Opc == Instruction::VICmp) {
// FIXME: REMOVE VFCMP Support
// FIXME: REMOVE VICMP Support
if (!Val0->getType()->isIntOrIntVector() ||
!isa<VectorType>(Val0->getType()))
return Error(ID.Loc, "vicmp requires vector floating point operands");
ID.ConstantVal = ConstantExpr::getVICmp(Pred, Val0, Val1);
}
ID.Kind = ValID::t_Constant;