From 750feae3fa82662bc6156e908661f069882986c9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 25 Jun 2017 06:56:34 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306236 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/PatternMatch.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/llvm/IR/PatternMatch.h b/include/llvm/IR/PatternMatch.h index cd1d80a35ccb3..9e9c8ac75d2a8 100644 --- a/include/llvm/IR/PatternMatch.h +++ b/include/llvm/IR/PatternMatch.h @@ -946,10 +946,7 @@ template struct not_match { private: bool isAllOnes(Value *V) { - return (isa(V) || isa(V) || - // FIXME: Remove CV. - isa(V)) && - cast(V)->isAllOnesValue(); + return isa(V) && cast(V)->isAllOnesValue(); } };