From ee13fbe848024543a34625f3229ca16c24cbcc5b Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 12 May 2015 23:36:18 +0000 Subject: 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. llvm-svn: 237211 --- llvm/lib/CodeGen/ScheduleDAGInstrs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp index 583ed38f313..b4a34be759c 100644 --- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -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. -- cgit v1.2.3