Report of Potential Risks when Using Loop Extractor Pass

Dear all,

Hi! Recently, I use loop extractor pass in the latest version, which extracts loops into functions, to optimize part of the code.
However, I notice some problems which might be caused by the assumption of loop extractor and lead to some functionalities may miss in the transformed IR code.
I walk around the problem by inserting redundant basic blocks for loop header but I think it could cause problem for someone else.

I guess the problem is caused by the assumption shown in llvm/lib/Transforms/Utils/CodeExtractor.cpp

Dear all,

Hi! I would like to withdraw the report since I found that the problem is caused by my own optimization code.
THANKS for your time! :slight_smile: