[LoopUnrollAndJam] Avoid repeated instructions for UAJ analysis

Avoid visiting repeated instructions for processHeaderPhiOperands as it can cause a scenario of endless loop. Test case is attached and can be ran with `opt -basic-aa -tbaa -loop-unroll-and-jam  -allow-unroll-and-jam -unroll-and-jam-count=4`.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D97407

GitOrigin-RevId: 55487079a9bb039103615a78500d1cdd4de474ab
2 files changed