[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
This commit is contained in:
parent
3885b49b8e
commit
95790c546f
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue