[llvm] [Pipeline] Eliminate dead loops introduced by InstCombine (PR #69073)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 14 12:11:59 PDT 2023


https://github.com/nikic requested changes to this pull request.

Architecturally, trying to exploit optimization opportunities that are only opened up by runtime unrolling is pretty much always the wrong thing to do. At that point the optimization pretty much happens by accident, not by intent, and only on some subtargets.

In this case, what you want to do instead is allow calculating the exit value in the loop earlier. Possibly in SCEV/IndVars. A possibly relevant observation here is that the exit value reaches a fixed point after a small number of iterations.

https://github.com/llvm/llvm-project/pull/69073


More information about the llvm-commits mailing list