[LV] How to peel a runtime const iteration of a loop

Hi,
This is a query regarding loop peel with a run-time const iteration.
For case [AArch64] Performance is now affected due to unaligned access · Issue #59912 · llvm/llvm-project · GitHub, as the offset of the int array[NUM] in caller function foo_unalign is not a compile-time constants, so I can’t use the API peelLoop to peel the specific number of loop count.
Do we have a similar API to solve this problem? Any suggestions would be very welcome.

Regards,

Look at llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp?

Thank you very much, I recently read the relevant code and it looks like it’s just the reference I want.