[all-commits] [llvm/llvm-project] 22c91d: [LoopInterchange][PR57148] Ensure the correct form...
CongzheUalberta via All-commits
all-commits at lists.llvm.org
Wed Sep 21 21:21:32 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 22c91df52cccc4fa84bfa5d4e549f44ddd21a9ed
https://github.com/llvm/llvm-project/commit/22c91df52cccc4fa84bfa5d4e549f44ddd21a9ed
Author: Congzhe Cao <congzhe.cao at huawei.com>
Date: 2022-09-22 (Thu, 22 Sep 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
M llvm/test/Transforms/LoopInterchange/pr43176-move-to-new-latch.ll
A llvm/test/Transforms/LoopInterchange/pr57148.ll
Log Message:
-----------
[LoopInterchange][PR57148] Ensure the correct form of IR after transformation
This is a bugfix patch that resolves the following two bugs in loop interchange:
1. PR57148 which is an assertion error due to of loss of LCSSA form after interchange,
as referred to test1() in pr57148.ll.
2. Use before def for the outermost loop induction variables after interchange,
as referred to test2() in pr57148.ll.
The fix in this patch is that:
1. In cases where the LCSSA form is not maintained after interchange, we update the IR
to the LCSSA form again.
2. We split the phi nodes in the inner loop header into a separate basic block to avoid
the situation where use of the outer indvar appears before its def after interchange.
Previously we already did this for innermost loops, now we do it for non-innermost
loops (e.g., middle loops) as well.
Reviewed By: bmahjour, Meinersbur, #loopoptwg
Differential Revision: https://reviews.llvm.org/D132055
More information about the All-commits
mailing list