CodeGen: ignore DEBUG_VALUE nodes in KILL tagging

DEBUG_VALUE nodes do not take part in code generation.  Ignore them when
performing KILL updates.  Addresses PR23486.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool
2015-05-12 23:36:18 +00:00
parent 42042e5c3f
commit 82550fed5c
2 changed files with 94 additions and 0 deletions

View File

@ -1115,6 +1115,12 @@ static void toggleBundleKillFlag(MachineInstr *MI, unsigned Reg,
if (!MO->isReg() || MO->isDef() || Reg != MO->getReg())
continue;
// DEBUG_VALUE nodes do not contribute to code generation and should
// always be ignored. Failure to do so may result in trying to modify
// KILL flags on DEBUG_VALUE nodes, which is distressing.
if (MO->isDebug())
continue;
// If the register has the internal flag then it could be killing an
// internal def of the register. In this case, just skip. We only want
// to toggle the flag on operands visible outside the bundle.