OSDN Git Service

[Localizer] Don't trick to be smart for the insertion point
authorQuentin Colombet <qcolombet@apple.com>
Tue, 30 May 2017 20:53:06 +0000 (20:53 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 30 May 2017 20:53:06 +0000 (20:53 +0000)
commitc832920d4b92e8b280cc33dee8449101991c196e
treecdcc3746102c151e15d32b9cb92fc957c7a61ee1
parenta7be02e45770a4da23ec222a338b0bbecc1c4004
[Localizer] Don't trick to be smart for the insertion point

There is no guarantee that the first use of a constant that is traversed
is actually the first in the related basic block. Thus, if we use that
as the insertion point we may end up with definitions that don't
dominate there use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304244 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/Localizer.cpp
test/CodeGen/AArch64/GlobalISel/localizer.mir