diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-05 08:26:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-05 08:26:05 +0000 |
commit | 5f743cd05ccbf3d54bf3c0d9c07d2c721b24c89c (patch) | |
tree | be0b9358723da079328f04e3047e47077494bcfd | |
parent | 0d5bffc842b7b8bc4f76a85c4e86706fa8146123 (diff) | |
download | external_llvm-5f743cd05ccbf3d54bf3c0d9c07d2c721b24c89c.zip external_llvm-5f743cd05ccbf3d54bf3c0d9c07d2c721b24c89c.tar.gz external_llvm-5f743cd05ccbf3d54bf3c0d9c07d2c721b24c89c.tar.bz2 |
produce the same diagnostics for vicmp constant exprs as vicmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61685 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 1a5a521..8a686ce 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -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; |