[PATCH] D120330: [MachineSink] Fix CFG walk in clobber check (PR53990)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 00:35:25 PST 2022


nikic added a comment.

In D120330#3339261 <https://reviews.llvm.org/D120330#3339261>, @shchenz wrote:

> Can we check why the instruction is sunk from a shallower block `From` to a deeper block `To`?  `MachineSinking::isProfitableToSinkTo()` should not allow this?

This happens because the loop is irreducible. The loop depth check is based on MachineLoopInfo, which only handles natural loops. So sinking into irreducible cycles is not prevented by the profitability check.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120330/new/

https://reviews.llvm.org/D120330



More information about the llvm-commits mailing list