[PATCH] D42689: [SCEV] Fix threshold limit check
Javed Absar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 06:39:30 PST 2018
javed.absar created this revision.
javed.absar added reviewers: sanjoy, dfukalov.
I think the correct AddOpsInlineThreshold size to check is after the Add has been merged with Ops.
https://reviews.llvm.org/D42689
Files:
lib/Analysis/ScalarEvolution.cpp
Index: lib/Analysis/ScalarEvolution.cpp
===================================================================
--- lib/Analysis/ScalarEvolution.cpp
+++ lib/Analysis/ScalarEvolution.cpp
@@ -2434,7 +2434,7 @@
bool DeletedAdd = false;
while (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Ops[Idx])) {
if (Ops.size() > AddOpsInlineThreshold ||
- Add->getNumOperands() > AddOpsInlineThreshold)
+ (Ops.size() + Add->getNumOperands()) > AddOpsInlineThreshold)
break;
// If we have an add, expand the add operands onto the end of the operands
// list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42689.131961.patch
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180130/b9e03713/attachment.bin>
More information about the llvm-commits
mailing list