summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-05 08:09:48 +0000
committerChris Lattner <sabre@nondot.org>2009-01-05 08:09:48 +0000
commitc38e99547e61534ad273451f4d8fa2a042d61e80 (patch)
treeae9fdfc973b6d2564d80845ee542e10122fcd79f /llvm
parentce473c7be059e216adc1854899d54907e3579fbc (diff)
downloadbcm5719-llvm-c38e99547e61534ad273451f4d8fa2a042d61e80.tar.gz
bcm5719-llvm-c38e99547e61534ad273451f4d8fa2a042d61e80.zip
add checking intentionally elided for vfcmp/vicmp since they should really
just be removed. However, this fixes PR3281:crash04.ll, diagnosing it with: lvm-as: crash04.ll:2:13: vfcmp requires vector floating point operands vfcmp uno double* undef, undef ^ llvm-svn: 61680
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 681a6622b3c..68946393119 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -2677,8 +2677,12 @@ bool LLParser::ParseCompare(Instruction *&Inst, PerFunctionState &PFS,
return Error(Loc, "icmp requires integer operands");
Inst = new ICmpInst(CmpInst::Predicate(Pred), LHS, RHS);
} else if (Opc == Instruction::VFCmp) {
+ if (!LHS->getType()->isFPOrFPVector() || !isa<VectorType>(LHS->getType()))
+ return Error(Loc, "vfcmp requires vector floating point operands");
Inst = new VFCmpInst(CmpInst::Predicate(Pred), LHS, RHS);
} else if (Opc == Instruction::VICmp) {
+ if (!LHS->getType()->isIntOrIntVector() || !isa<VectorType>(LHS->getType()))
+ return Error(Loc, "vicmp requires vector floating point operands");
Inst = new VICmpInst(CmpInst::Predicate(Pred), LHS, RHS);
}
return false;
OpenPOWER on IntegriCloud