[LoopFuse] Ensure inner loops are in loop simplified form under new PM
authorMengxuan Cai <mengxuan.cai@huawei.com>
Fri, 11 Nov 2022 17:42:45 +0000 (12:42 -0500)
committerCongzheUalberta <congzhecao@gmail.com>
Fri, 11 Nov 2022 20:55:59 +0000 (15:55 -0500)
commitec210f394233798c531b52b43ac3ff4354339bb0
treeb14a86049b1d5e8a95fc4d953367a395049d7ff1
parent681a6a3990226c667fb648952731d2753df2716d
[LoopFuse] Ensure inner loops are in loop simplified form under new PM

LoopInfo doesn't give all loops in a loop nest, it gives top level loops
only. While isLoopSimplifyForm() only checkes for the outter most loop of a
loop nest. As a result, inner loops that are not in simplied form can
not be simplified with the original code.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D137672
llvm/lib/Transforms/Scalar/LoopFuse.cpp
llvm/test/Transforms/LoopFusion/ensure_loop_simplify_form.ll