[PATCH] D120882: fix overflow in example code.
pl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 23:38:00 PST 2022
0x00-pl updated this revision to Diff 412942.
0x00-pl edited the summary of this revision.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120882/new/
https://reviews.llvm.org/D120882
Files:
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
Index: llvm/lib/Transforms/Scalar/LoopInterchange.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -1069,8 +1069,8 @@
continue;
// If we find the inner induction after an outer induction e.g.
- // for(int i=0;i<N;i++)
- // for(int j=0;j<N;j++)
+ // for(int i=1;i<N;i++)
+ // for(int j=1;j<N;j++)
// A[i][j] = A[i-1][j-1]+k;
// then it is a good order.
if (AR->getLoop() == InnerLoop) {
@@ -1083,8 +1083,8 @@
}
}
// If we find the outer induction after an inner induction e.g.
- // for(int i=0;i<N;i++)
- // for(int j=0;j<N;j++)
+ // for(int i=1;i<N;i++)
+ // for(int j=1;j<N;j++)
// A[j][i] = A[j-1][i-1]+k;
// then it is a bad order.
if (AR->getLoop() == OuterLoop) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120882.412942.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220304/ff9ad022/attachment.bin>
More information about the llvm-commits
mailing list