Fix in InlineSpiller to make the rematerilization loop also consider
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Mon, 1 Sep 2014 11:04:07 +0000 (11:04 +0000)
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Mon, 1 Sep 2014 11:04:07 +0000 (11:04 +0000)
commit7948290532c1b54cbad5a189d0728c0ed9d5095c
treec45ca3f01af3cc94560d287d490f3564e5acdef4
parentc642ad95462bdab20d221ac373ed812a95f46d35
Fix in InlineSpiller to make the rematerilization loop also consider
implicit uses of the whole register when a sub register is defined.

Now the same iterator is used in the rematerilization loop as in the
spill loop later.

Patch provided by Mikael Holmen.

This fix was proposed and reviewed by Quentin Colombet,
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/076135.html.

Unfortunately, this error in the rematerilization code has only been
seen in a large test case for an out-of-tree target, and is probably
hard to reproduce on an in-tree target. Therefore, no testcase is
provided.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216873 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/InlineSpiller.cpp