summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-06-27 15:39:40 +0000
committerCraig Topper <craig.topper@gmail.com>2017-06-27 15:39:40 +0000
commit81cbb0c2374d5c49037e818c026f9cdecacfe481 (patch)
treec7bda5cde75a67a5d177d5e4f5c9d4285bfccea2 /llvm/include
parent0a60d8581116193d254cc7ce64e29d0294f1c53f (diff)
downloadbcm5719-llvm-81cbb0c2374d5c49037e818c026f9cdecacfe481.tar.gz
bcm5719-llvm-81cbb0c2374d5c49037e818c026f9cdecacfe481.zip
[PatternMatch] Remove 64-bit or less restriction from m_SpecificInt
Not sure why this restriction existed, but it seems like we should support any size Constant here. The particular pattern in the tests is not the only use of this matcher in the tree. There's one in CodeGenPrepare and one in InstSimplify as well. Differential Revision: https://reviews.llvm.org/D34666 llvm-svn: 306417
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/IR/PatternMatch.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/include/llvm/IR/PatternMatch.h b/llvm/include/llvm/IR/PatternMatch.h
index 9e9c8ac75d2..4015e445097 100644
--- a/llvm/include/llvm/IR/PatternMatch.h
+++ b/llvm/include/llvm/IR/PatternMatch.h
@@ -399,10 +399,7 @@ struct specific_intval {
if (const auto *C = dyn_cast<Constant>(V))
CI = dyn_cast_or_null<ConstantInt>(C->getSplatValue());
- if (CI && CI->getBitWidth() <= 64)
- return CI->getZExtValue() == Val;
-
- return false;
+ return CI && CI->getValue() == Val;
}
};
OpenPOWER on IntegriCloud