[StackColoring] When remapping alloca's move the To alloca if the From alloca is...
authorCraig Topper <craig.topper@intel.com>
Tue, 19 May 2020 16:59:24 +0000 (09:59 -0700)
committerCraig Topper <craig.topper@intel.com>
Tue, 19 May 2020 17:37:27 +0000 (10:37 -0700)
commitccba60a784e72fd6cd35cfb6f6290fa553395027
tree57e1dd0be95012808bc3c558dd468ca8b029d63f
parente2e38fca64e49d684de0b100437fe2f227f8fcdd
[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
llvm/lib/CodeGen/StackColoring.cpp
llvm/test/CodeGen/X86/StackColoring-use-between-allocas.mir [new file with mode: 0644]