This patch fixes a minor problem with SCC sorting wherein a value is compared to itself. The problem has been present since this code was introduced in D114204. It appears to be a simple typo.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I would guess that it is possible to write a test for this, but I don't know this code well enough to do it. When this code was added, llvm/test/Transforms/SampleProfile/profile-context-order.ll was updated to test it, but clearly that update to the test didn't depend on this comparison. Perhaps @hoy could suggest a test?