From 95790c546fc92ee179ee60b2f479892165873d7d Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Tue, 23 Oct 2018 16:54:28 +0000 Subject: [InstCombine] use 'match' to simplify code There's probably some vector-with-undef-element pattern that shows an improvement, so this is probably not quite 'NFC'. This is the last step towards removing the fake binop queries for not/neg. Ie, there are no more uses of those functions in trunk. Fneg should follow. llvm-svn: 345050 --- llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index 3a18744e434..a4d7fe8861b 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -141,7 +141,7 @@ static inline Constant *SubOne(Constant *C) { /// uses of V and only keep uses of ~V. static inline bool IsFreeToInvert(Value *V, bool WillInvertAllUses) { // ~(~(X)) -> X. - if (BinaryOperator::isNot(V)) + if (match(V, m_Not(m_Value()))) return true; // Constants can be considered to be not'ed values. -- cgit v1.2.3