Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
[PatternMatch] Just check if value is a Constant before calling isAll…
Browse files Browse the repository at this point in the history
…OnesValue for not_match. We don't really need to check for a specific subclass of Constant. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306236 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
topperc committed Jun 25, 2017
1 parent e7f7e6d commit 750feae
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/llvm/IR/PatternMatch.h
Expand Up @@ -946,10 +946,7 @@ template <typename LHS_t> struct not_match {

private:
bool isAllOnes(Value *V) {
return (isa<ConstantInt>(V) || isa<ConstantDataVector>(V) ||
// FIXME: Remove CV.
isa<ConstantVector>(V)) &&
cast<Constant>(V)->isAllOnesValue();
return isa<Constant>(V) && cast<Constant>(V)->isAllOnesValue();
}
};

Expand Down

0 comments on commit 750feae

Please sign in to comment.