]> granicus.if.org Git - llvm/commitdiff
[PatternMatch] Just check if value is a Constant before calling isAllOnesValue for...
authorCraig Topper <craig.topper@gmail.com>
Sun, 25 Jun 2017 06:56:34 +0000 (06:56 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 25 Jun 2017 06:56:34 +0000 (06:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306236 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/PatternMatch.h

index cd1d80a35ccb3048c8b7a45b0af4d08d493dddfb..9e9c8ac75d2a8b0454f897a9db9ac524b1856fb4 100644 (file)
@@ -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();
   }
 };