[PATCH] D39995: [SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 03:45:47 PST 2017


fhahn added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:9551
               [](const CaseCluster &a, const CaseCluster &b) {
-      return a.Prob > b.Prob;
     });
----------------
I might be missing something but could we still end up with multiple clusters where `a.Prob == b.Prob && a.Low == b.Low` ? Then the order of those nodes would still be non-deterministic, no?


Repository:
  rL LLVM

https://reviews.llvm.org/D39995





More information about the llvm-commits mailing list