mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 18:46:05 +00:00

There was a crash because there was inconsistency between 'isAvailableAt' and 'makeAvailableAt' queries. 'makeAvailableAt' is called on conditions of both guards (dominating and dominated) and 'isAvailableAt' is called only for dominated guard's condition. Before this patch, it didn't matter because insertion point always matched the dominating guard. Now, because they are different, this inconsistency leads to incorrect transforms which are caught by assert. The fix is to check 'isAvailableAt' for both conditions. Differential Revision: https://reviews.llvm.org/D142693