summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-05-18 19:49:05 +0000
committerNate Begeman <natebegeman@mac.com>2008-05-18 19:49:05 +0000
commit65720c968c0647059822e453846282a13e78dc30 (patch)
treebf74f11c1b118270bb055a1b73969474f9a24233
parent7af15f17b50565347b229bbc82088ae1965b0f5c (diff)
downloadbcm5719-llvm-65720c968c0647059822e453846282a13e78dc30.tar.gz
bcm5719-llvm-65720c968c0647059822e453846282a13e78dc30.zip
Teach GVN to not assert on vector comparisons
llvm-svn: 51230
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index c671078587f..3af6c2022ba 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -226,7 +226,7 @@ Expression::ExpressionOpcode ValueTable::getOpcode(BinaryOperator* BO) {
}
Expression::ExpressionOpcode ValueTable::getOpcode(CmpInst* C) {
- if (isa<ICmpInst>(C)) {
+ if (isa<ICmpInst>(C) || isa<VICmpInst>(C)) {
switch (C->getPredicate()) {
default: // THIS SHOULD NEVER HAPPEN
assert(0 && "Comparison with unknown predicate?");
@@ -242,7 +242,7 @@ Expression::ExpressionOpcode ValueTable::getOpcode(CmpInst* C) {
case ICmpInst::ICMP_SLE: return Expression::ICMPSLE;
}
}
- assert(isa<FCmpInst>(C) && "Unknown compare");
+ assert((isa<FCmpInst>(C) || isa<VFCmpInst>(C)) && "Unknown compare");
switch (C->getPredicate()) {
default: // THIS SHOULD NEVER HAPPEN
assert(0 && "Comparison with unknown predicate?");
OpenPOWER on IntegriCloud