[SimpleLoopUnswitch] Ignore inner loops when injecting invariant conditions. PR60736
authorMax Kazantsev <mkazantsev@azul.com>
Tue, 14 Feb 2023 12:26:15 +0000 (19:26 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Tue, 14 Feb 2023 12:35:34 +0000 (19:35 +0700)
commitc7ea20c8eed5910f2b26e29d251ea9670d08345b
tree7694149a2b6033db34ac61c8fa4d47cf195ad3e4
parentf3c008ca776bd17c085ba5be34cdf7569971628a
[SimpleLoopUnswitch] Ignore inner loops when injecting invariant conditions. PR60736

The transform and all related updates don't expect the situation when candidate
is from an inner loop. I think we *might* still do something in this case, but
the current implementation doesn't expect this and does incorrect loop info
updates in this situation.

Details: https://github.com/llvm/llvm-project/issues/60736
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
llvm/test/Transforms/SimpleLoopUnswitch/pr60736.ll