Files
llvm/test/Transforms/Mem2Reg
Joseph Tremoulet c446570fee [Mem2Reg] Fix nondeterministic corner case
Summary:
When mem2reg inserts phi nodes in blocks with unreachable predecessors,
it adds undef operands for those incoming edges.  When there are
multiple such predecessors, the order is currently based on the address
of the BasicBlocks.  This change fixes that by using the BBNumbers in
the sort/search predicates, as is done elsewhere in mem2reg to ensure
determinism.

Also adds a testcase with a bunch of unreachable preds, which
(nodeterministically) fails without the fix.


Reviewers: majnemer

Reviewed By: majnemer

Subscribers: mgrang, llvm-commits

Differential Revision: https://reviews.llvm.org/D55077

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348024 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-30 19:20:02 +00:00
..
2015-12-11 13:36:59 +00:00