Expand loop peeling phi computation to handle binary ops and casts
authorJamie Schmeiser <schmeise@ca.ibm.com>
Mon, 5 Dec 2022 17:10:53 +0000 (12:10 -0500)
committerJamie Schmeiser <schmeise@ca.ibm.com>
Mon, 5 Dec 2022 17:10:53 +0000 (12:10 -0500)
commit2b6683fd5f7481d57a29ca6c5cd68822e1cfe5b0
tree1b2008c6e20de697f2e853fffd6685d6132828c3
parent3d35546cd1680b0e087fb6c9976799760146c377
Expand loop peeling phi computation to handle binary ops and casts

Summary:
Expand the capabilities of the code for computing how many peels are
needed to make phis determined.  A cast gets the peel count for the
value being casted while a binary op gets the maximum of the operands.

Respond to review comments: remove redundant asserts.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By:mkazantsev (Max Kazantsev),syzaara (Zaara Syeda)
Differential Revision: https://reviews.llvm.org/D138719
llvm/lib/Transforms/Utils/LoopPeel.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-phi-analysis.ll