Files
clang-p2996/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Nikita Popov 34e16b6b9c [IndVars] Fix strict weak ordering violation (#108947)
The sort used the block name as a tie-breaker, which will not work for
unnamed blocks and can result in a strict weak ordering violation.

Fix this by checking that all exiting blocks dominate the latch first,
which means that we have a total dominance order. This makes the code
structure here align with what optimizeLoopExits() does.

Fixes https://github.com/llvm/llvm-project/issues/108618.
2024-09-17 15:33:23 +02:00

82 KiB