[LoopInterchange] Support loop interchange with floating point reductions
authorCongzhe Cao <congzhe.cao@huawei.com>
Sun, 6 Feb 2022 21:55:20 +0000 (16:55 -0500)
committerCongzheUalberta <congzhecao@gmail.com>
Sun, 6 Feb 2022 22:04:47 +0000 (17:04 -0500)
commit1ef04326ec5f634b29868b3900e42683a32d10b1
tree671d1d99c98fe12e35385425a2be0ff539cbd1c5
parent0d8850ae2cae85d49bea6ae0799fa41c7202c05c
[LoopInterchange] Support loop interchange with floating point reductions

Enabled loop interchange support for floating point reductions
if it is allowed to reorder floating point operations.

Previously when we encouter a floating point PHI node in the
outer loop exit block, we bailed out since we could not detect
floating point reductions in the early days. Now we remove this
limiation since we are able to detect floating point reductions.

Reviewed By: #loopoptwg, Meinersbur

Differential Revision: https://reviews.llvm.org/D117450
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
llvm/test/Transforms/LoopInterchange/lcssa.ll
llvm/test/Transforms/LoopInterchange/reductions-across-inner-and-outer-loop.ll