m_not should match vector not
authorChris Lattner <sabre@nondot.org>
Fri, 15 Jun 2007 06:13:47 +0000 (06:13 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 15 Jun 2007 06:13:47 +0000 (06:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37587 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/PatternMatch.h

index d8099a9affb00750061b9810fde0b0cdc71d5e4b..6b295d6482112be97114c07937633be04be5f44c 100644 (file)
@@ -329,8 +329,12 @@ private:
   bool matchIfNot(Value *LHS, Value *RHS) {
     if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS))
       return CI->isAllOnesValue() && L.match(LHS);
-    else if (ConstantInt *CI = dyn_cast<ConstantInt>(LHS))
+    if (ConstantInt *CI = dyn_cast<ConstantInt>(LHS))
       return CI->isAllOnesValue() && L.match(RHS);
+    if (ConstantVector *CV = dyn_cast<ConstantVector>(RHS))
+      return CV->isAllOnesValue() && L.match(LHS);
+    if (ConstantVector *CV = dyn_cast<ConstantVector>(LHS))
+      return CV->isAllOnesValue() && L.match(RHS);
     return false;
   }
 };