summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-30 16:15:56 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-30 16:16:55 +0000
commitd52f5ed01a2a46a81555ee1b655c6b682c4dbd6c (patch)
treedd92fc6f44dcc92a328e77e78a00e1b098c2c751 /llvm/lib/Transforms
parent19ea1d46ccfe7decd623ba3f860d8ba7a9f1bb44 (diff)
downloadbcm5719-llvm-d52f5ed01a2a46a81555ee1b655c6b682c4dbd6c.tar.gz
bcm5719-llvm-d52f5ed01a2a46a81555ee1b655c6b682c4dbd6c.zip
[SLPVectorizer] Use getAPInt() for comparison. NFCI.
Technically integers can assert on getZExtValue() if beyond i64 range, and a fuzzer usually find this.....
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index c78d72a8695..bdcd5bfb981 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2449,7 +2449,7 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
dyn_cast<SCEVConstant>(SE->getMinusSCEV(ScevN, Scev0));
uint64_t Size = DL->getTypeAllocSize(ScalarTy);
// Check that the sorted loads are consecutive.
- if (Diff && Diff->getAPInt().getZExtValue() == (VL.size() - 1) * Size) {
+ if (Diff && Diff->getAPInt() == (VL.size() - 1) * Size) {
if (CurrentOrder.empty()) {
// Original loads are consecutive and does not require reordering.
++NumOpsWantToKeepOriginalOrder;
OpenPOWER on IntegriCloud