From b0760c80b3994d41fcf350b7cd33a9a8f07338f9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 15 Jun 2007 06:13:47 +0000 Subject: [PATCH] m_not should match vector not git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37587 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/PatternMatch.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h index d8099a9affb..6b295d64821 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(RHS)) return CI->isAllOnesValue() && L.match(LHS); - else if (ConstantInt *CI = dyn_cast(LHS)) + if (ConstantInt *CI = dyn_cast(LHS)) return CI->isAllOnesValue() && L.match(RHS); + if (ConstantVector *CV = dyn_cast(RHS)) + return CV->isAllOnesValue() && L.match(LHS); + if (ConstantVector *CV = dyn_cast(LHS)) + return CV->isAllOnesValue() && L.match(RHS); return false; } }; -- 2.34.1