[llvm] [LICM][MustExec] Make must-exec logic for IV condition commutative (PR #93150)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat May 25 11:40:04 PDT 2024
nikic wrote:
@efriedma-quic I think "Suppose a loop exits via a given exit" is the critical bit here. I don't think we can make this assumption when computing exit counts. The contract for the exit count is not just that "if this exit is taken, it will be after N backedges taken" but also "the backedge will not be taken more than N times before the loop exits through some exit". As such, if you have a `ule N` condition, reporting `N + 1` would (generally) not be legal, but for `N = -1` the second condition would be violated (but not the first).
https://github.com/llvm/llvm-project/pull/93150
More information about the llvm-commits
mailing list