HomePhabricator

[StackColoring] When remapping alloca's move the To alloca if the From alloca…

Authored by craig.topper on Tue, May 19, 9:59 AM.

Description

[StackColoring] When remapping alloca's move the To alloca if the From alloca is before it.

If To is after From its possible that there's a use of From
between them.

Fixes issue reported here http://lists.llvm.org/pipermail/llvm-dev/2020-May/141421.html

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