aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/PatternMatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/PatternMatch.h')
-rw-r--r--include/llvm/Support/PatternMatch.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h
index d8099a9aff..6b295d6482 100644
--- a/include/llvm/Support/PatternMatch.h
+++ b/include/llvm/Support/PatternMatch.h
@@ -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;
}
};