LowerBitSets: Fix non-determinism bug.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 9 Sep 2015 22:30:32 +0000 (22:30 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 9 Sep 2015 22:30:32 +0000 (22:30 +0000)
commitd77a329d71c6c71c0788ca4578d99478cc82ca01
treef1ed90f5da07f74c86d209e0055b41e0822cfe53
parent69d051c87d28550b8721143a4d3135b4fa593af0
LowerBitSets: Fix non-determinism bug.

Visit disjoint sets in a deterministic order based on the maximum BitSetNM
index, otherwise the order in which we visit them will depend on pointer
comparisons. This was being exposed by MSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247201 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/LowerBitSets.cpp
test/Transforms/LowerBitSets/nonstring.ll
test/Transforms/LowerBitSets/simple.ll