Fix addRegisterDead and addRegisterKilled to be more thorough
authorDan Gohman <gohman@apple.com>
Wed, 3 Sep 2008 15:56:16 +0000 (15:56 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 3 Sep 2008 15:56:16 +0000 (15:56 +0000)
commit3f62940561760fe5dcc8675853be57ee4ac8069a
treef165fbd55c3f61a5325ffcecc5448533ffb6c102
parentd0ac373660de64fe210e50458c7702432b3f9605
Fix addRegisterDead and addRegisterKilled to be more thorough
when searching for redundant subregister dead/kill bits.

Previously it was common to see instructions marked like this:
  "RET %EAX<imp-use,kill>, %AX<imp-use,kill>"

With this change, addRegisterKilled continues scanning after
finding the %EAX operand, so it proceeds to discover the
redundant %AX kill and eliminates it, producing this:
  "RET %EAX<imp-use,kill>"

This currently has no effect on the generated code.

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