Skip to content
Commit ae14fae0 authored by Dmitry Makogon's avatar Dmitry Makogon
Browse files

[SCEVExpander] Use stable_sort to sort loop Phis in SCEVExpander::replaceCongruentIVs

This is a fix for test failures on expensive checks build caused by db289340.

With LLVM_ENABLE_EXPENSIVE_CHECKS enabled the llvm::sort shuffles the given container.
However, the sort is only called when the TTI is passed to replaceCongruentIVs.
In the mentioned patch we pass it TTI, so the sort happens. But due to shuffling
equivalent Phis may appear in different order from run to run.
With the stable_sort instead of sort this is impossible - the order of sorted Phis
is preserved.
parent 65431d3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment