diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-10-23 16:54:28 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-10-23 16:54:28 +0000 |
commit | 95790c546fc92ee179ee60b2f479892165873d7d (patch) | |
tree | eaf5cc17d7665f9e5db5c00f3a9a2ac0a4e064fb /llvm/lib/Transforms/InstCombine/InstCombineInternal.h | |
parent | 3885b49b8ec0803d42301c7ba03f2ab8a114a2fa (diff) | |
download | bcm5719-llvm-95790c546fc92ee179ee60b2f479892165873d7d.tar.gz bcm5719-llvm-95790c546fc92ee179ee60b2f479892165873d7d.zip |
[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
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 2 |
1 files changed, 1 insertions, 1 deletions
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. |