[ARM64] Teach the ARM64DeadRegisterDefinition pass to respect implicit-defs.
authorLang Hames <lhames@gmail.com>
Thu, 3 Apr 2014 20:51:08 +0000 (20:51 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 3 Apr 2014 20:51:08 +0000 (20:51 +0000)
commit89218827c87ce2e3ef9f968550e060fae9dfd827
tree8d2deb1e7df579e4b8adeef7164fc3a320eb1e33
parent23839869646bc14cd487801fd753451370f2ad25
[ARM64] Teach the ARM64DeadRegisterDefinition pass to respect implicit-defs.

When rematerializing through truncates, the coalescer may produce instructions
with dead defs, but live implicit-defs of subregs:
E.g.
  %X1<def,dead> = MOVi64imm 2, %W1<imp-def>; %X1:GPR64, %W1:GPR32

These instructions are live, and their definitions should not be rewritten.

Fixes <rdar://problem/16492408>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205565 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM64/ARM64DeadRegisterDefinitionsPass.cpp
test/CodeGen/ARM64/dead-register-def-bug.ll [new file with mode: 0644]