[llvm] r306236 - [PatternMatch] Just check if value is a Constant before calling isAllOnesValue for not_match. We don't really need to check for a specific subclass of Constant. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 24 23:56:34 PDT 2017
Author: ctopper
Date: Sat Jun 24 23:56:34 2017
New Revision: 306236
URL: http://llvm.org/viewvc/llvm-project?rev=306236&view=rev
Log:
[PatternMatch] Just check if value is a Constant before calling isAllOnesValue for not_match. We don't really need to check for a specific subclass of Constant. NFC
Modified:
llvm/trunk/include/llvm/IR/PatternMatch.h
Modified: llvm/trunk/include/llvm/IR/PatternMatch.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/PatternMatch.h?rev=306236&r1=306235&r2=306236&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/PatternMatch.h (original)
+++ llvm/trunk/include/llvm/IR/PatternMatch.h Sat Jun 24 23:56:34 2017
@@ -946,10 +946,7 @@ template <typename LHS_t> struct not_mat
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();
}
};
More information about the llvm-commits
mailing list