OSDN Git Service

ExpandPostRAPseudos should transfer implicit uses, not only implicit defs
authorMichael Kuperstein <mkuper@google.com>
Fri, 15 Jul 2016 22:31:14 +0000 (22:31 +0000)
committerMichael Kuperstein <mkuper@google.com>
Fri, 15 Jul 2016 22:31:14 +0000 (22:31 +0000)
commit467260108e37a4a1310f5e2134ac00242a71a6fc
treeb0aa3947f07b9cb9fa28aa796725627763531779
parent36b9c09330bfb5e771914cfe307588f30d5510d2
ExpandPostRAPseudos should transfer implicit uses, not only implicit defs

Previously, we would expand:
%BL<def> = COPY %DL<kill>, %EBX<imp-use,kill>, %EBX<imp-def>
Into:
%BL<def> = MOV8rr %DL<kill>, %EBX<imp-def>
Dropping the imp-use on the floor.

That confused CriticalAntiDepBreaker, which (correctly) assumes that if an
instruction defs but doesn't use a register, that register is dead immediately
before the instruction - while in this case, the high lanes of EBX can be very
much alive.

This fixes PR28560.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275634 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ExpandPostRAPseudos.cpp
test/CodeGen/ARM/twoaddrinstr.ll
test/CodeGen/X86/pr28560.ll [new file with mode: 0644]