aboutsummaryrefslogtreecommitdiffstats
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
commit1d6e4091f69bea5010997846cfdf3778a9766eee (patch)
treee23c4b16286cb4f6a3cb75920f77a9e8463af674
parentf44085a86a3f3cb743fb8822108d8360dd094539 (diff)
downloadexternal_llvm-1d6e4091f69bea5010997846cfdf3778a9766eee.zip
external_llvm-1d6e4091f69bea5010997846cfdf3778a9766eee.tar.gz
external_llvm-1d6e4091f69bea5010997846cfdf3778a9766eee.tar.bz2
Teach GVN to not assert on vector comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51230 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/GVN.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index c671078..3af6c20 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/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?");