diff options
author | Congzhe Cao <congzhe.cao@huawei.com> | 2021-05-11 10:59:50 -0400 |
---|---|---|
committer | CongzheUalberta <congzhecao@gmail.com> | 2021-05-11 11:00:46 -0400 |
commit | 29342291d25b83da97e74d75004b177ba41114fc (patch) | |
tree | 5948c608b00527fd4af45072964f429518fd9536 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | c58912eca743c612fd2a22c03b64a1bda3d2180f (diff) | |
download | llvm-29342291d25b83da97e74d75004b177ba41114fc.zip llvm-29342291d25b83da97e74d75004b177ba41114fc.tar.gz llvm-29342291d25b83da97e74d75004b177ba41114fc.tar.bz2 |
[LoopInterchange] Fix legality for triangular loops
This is a bug fix in legality check.
When we encounter triangular loops such as the following form:
for (int i = 0; i < m; i++)
for (int j = 0; j < i; j++), or
for (int i = 0; i < m; i++)
for (int j = 0; j*i < n; j++),
we should not perform interchange since the number of executions of the loop body
will be different before and after interchange, resulting in incorrect results.
Reviewed By: bmahjour
Differential Revision: https://reviews.llvm.org/D101305
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions