[MachineCombiner] Fix for ICE bug 20598
authorGerolf Hoflehner <ghoflehner@apple.com>
Tue, 12 Aug 2014 07:54:12 +0000 (07:54 +0000)
committerGerolf Hoflehner <ghoflehner@apple.com>
Tue, 12 Aug 2014 07:54:12 +0000 (07:54 +0000)
commit392f7d970c0e15441f47d4e137ccc77ecb3d793a
treec93f5111beb9e83aeb41c4c92beb760e23dfda2f
parent2925be515b30aa8a69d156849aaf5896c5cbcc9a
[MachineCombiner] Fix for ICE bug 20598

The combiner ignored DBG nodes when checking
the uses of a virtual register.

It combined a sequence like
   %vreg1 = madd %vreg2, %vreg3,...
   DBG_VALUE (%vreg1 ...)
   %vreg4 = add %vreg1,...
to
  %vreg4 = madd %vreg2, %vreg3

leaving behind a dangling DBG_VALUE with
a definition. This triggered an assertion
in the MachineTraceMetrics.cpp module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215431 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll [new file with mode: 0644]